Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing data-cy attributes #91

Merged
merged 1 commit into from
Nov 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cogboard-webapp/src/components/DropdownField.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const DropdownField = props => {
value={value}
input={<Input name={name} id={id} />}
name={name}
inputProps={other}
SelectDisplayProps={other}
>
{loaded && children(options)}
</Select>
Expand Down
1 change: 1 addition & 0 deletions cogboard-webapp/src/components/Notifications/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const Notifications = () => {
key={id}
notificationId={id}
vertical="top"
data-cy="notification-snackbar"
/>
));
};
Expand Down
3 changes: 2 additions & 1 deletion cogboard-webapp/src/components/SnackbarWithVariant.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { deleteNotification } from '../actions/actionCreators';
import Snackbar from '@material-ui/core/Snackbar/index';
import SnackbarVariantContent from "./SnackbarVariantContent";

const SnackbarWithVariant = React.memo(({ notificationId, vertical, horizontal }) => {
const SnackbarWithVariant = React.memo(({ notificationId, vertical, horizontal, 'data-cy': dataCy }) => {
const getNotification = useMemo(createGetNotification, []);
const { type, message, duration } = useSelector(state => getNotification(state, notificationId))
const dispatch = useDispatch();
Expand All @@ -32,6 +32,7 @@ const SnackbarWithVariant = React.memo(({ notificationId, vertical, horizontal }
autoHideDuration={duration}
disableWindowBlurListener
open={isOpened}
data-cy={dataCy}
>
<SnackbarVariantContent
variant={type}
Expand Down
2 changes: 1 addition & 1 deletion cogboard-webapp/src/components/WidgetForm/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ import { MenuItem } from '@material-ui/core';

export const renderWidgetTypesMenu = (widgetTypes) =>
Object.entries(widgetTypes).map(([type, { name }]) => (
<MenuItem key={type} value={type}>{name}</MenuItem>
<MenuItem key={type} value={type} data-cy="widget-type-select-item">{name}</MenuItem>
));