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 = ({
isFetching,
}) => (
<Root>
<Button onClick={setEditMode(true)} primary>
<Button data-test="button-add-author" onClick={setEditMode(true)} primary>
{authors.length === 0 ? '+ Add submitting author' : '+ Add author'}
</Button>
{editMode && (
......@@ -54,9 +54,15 @@ const AuthorAdder = ({
<MenuItem label="Country*" name="country" options={countries} />
</Row>
<ButtonsContainer>
<Button onClick={setEditMode(false)}>Cancel</Button>
<Button data-test="button-cancel-author" onClick={setEditMode(false)}>
Cancel
</Button>
{!isFetching ? (
<Button onClick={handleSubmit} primary>
<Button
data-test="button-save-author"
onClick={handleSubmit}
primary
>
Save
</Button>
) : (
......
......@@ -19,7 +19,7 @@ export const ValidatedTextField = ({
}
export const MenuItem = ({ label, name, options }) => (
<MenuItemRoot>
<MenuItemRoot data-test="country-selector-author">
<StyledLabel>{label}</StyledLabel>
<ValidatedField
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