Skip to content
Snippets Groups Projects
Commit 05444116 authored by Bogdan Cochior's avatar Bogdan Cochior
Browse files

test(submission): add data-test ids

parent 02bc878e
No related branches found
No related tags found
No related merge requests found
...@@ -27,7 +27,7 @@ const AuthorAdder = ({ ...@@ -27,7 +27,7 @@ const AuthorAdder = ({
isFetching, isFetching,
}) => ( }) => (
<Root> <Root>
<Button onClick={setEditMode(true)} primary> <Button data-test="button-add-author" onClick={setEditMode(true)} primary>
{authors.length === 0 ? '+ Add submitting author' : '+ Add author'} {authors.length === 0 ? '+ Add submitting author' : '+ Add author'}
</Button> </Button>
{editMode && ( {editMode && (
...@@ -54,9 +54,15 @@ const AuthorAdder = ({ ...@@ -54,9 +54,15 @@ const AuthorAdder = ({
<MenuItem label="Country*" name="country" options={countries} /> <MenuItem label="Country*" name="country" options={countries} />
</Row> </Row>
<ButtonsContainer> <ButtonsContainer>
<Button onClick={setEditMode(false)}>Cancel</Button> <Button data-test="button-cancel-author" onClick={setEditMode(false)}>
Cancel
</Button>
{!isFetching ? ( {!isFetching ? (
<Button onClick={handleSubmit} primary> <Button
data-test="button-save-author"
onClick={handleSubmit}
primary
>
Save Save
</Button> </Button>
) : ( ) : (
......
...@@ -19,7 +19,7 @@ export const ValidatedTextField = ({ ...@@ -19,7 +19,7 @@ export const ValidatedTextField = ({
} }
export const MenuItem = ({ label, name, options }) => ( export const MenuItem = ({ label, name, options }) => (
<MenuItemRoot> <MenuItemRoot data-test="country-selector-author">
<StyledLabel>{label}</StyledLabel> <StyledLabel>{label}</StyledLabel>
<ValidatedField <ValidatedField
component={input => <Menu {...input} options={options} />} component={input => <Menu {...input} options={options} />}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment