Skip to content
Snippets Groups Projects
Commit f078b994 authored by Sinzeanu Demetriad's avatar Sinzeanu Demetriad
Browse files

feat: Add data-test for automation testing

parent 27e4c411
No related branches found
No related tags found
2 merge requests!110Sprint 21 Features,!94Hin 979
......@@ -69,7 +69,6 @@ const ExternalLink = styled.a`
text-decoration: underline;
}
`
const CustomLink = ExternalLink.withComponent(Link)
const Root = styled.div`
......
......@@ -69,7 +69,7 @@ const AuthorTagList = ({
{withAffiliations && (
<Item flex={0} ml={1}>
<ActionLink
data-test-id="affiliations-id"
data-test-id="author-affiliations"
icon={showAffiliation ? 'minus' : 'plus'}
onClick={toggleAffiliation}
>
......
......@@ -11,7 +11,7 @@ const ManuscriptAssignHE = ({
}) =>
canAssignHE ? (
<ContextualBox
data-test-id="assign-handling-editor-id"
data-test-id="assign-handling-editor"
expanded={expanded}
label="Assign Handling Editor"
scrollIntoView
......
......@@ -30,7 +30,7 @@ const ManuscriptHeader = ({
<Fragment>
<Row
alignItems="baseline"
data-test-id="manuscript-title-id"
data-test-id="manuscript-title"
justify="space-between"
>
<H2 mb={1}>{title}</H2>
......@@ -41,7 +41,7 @@ const ManuscriptHeader = ({
{authors.length > 0 && (
<Row
alignItems="center"
data-test-id="authors-row-id"
data-test-id="authors-row"
justify="flex-start"
mb={1}
>
......
......@@ -19,7 +19,7 @@ const ManuscriptMetadata = ({
{!!abstract && (
<Item mb={1}>
<ContextualBox
data-test-id="abstract-tab-id"
data-test-id="abstract-tab"
label="Abstract"
startExpanded
transparent
......@@ -33,7 +33,7 @@ const ManuscriptMetadata = ({
{conflicts.hasConflicts === 'yes' && (
<Item mb={1}>
<ContextualBox
data-test-id="conflict-of-interest-tab-id"
data-test-id="conflict-of-interest-tab"
label="Conflict of Interest"
transparent
>
......@@ -45,11 +45,7 @@ const ManuscriptMetadata = ({
)}
{!isEmpty(files) && (
<Item mb={1}>
<ContextualBox
data-test-id="files-tab-id"
label={filesLabel}
transparent
>
<ContextualBox data-test-id="files-tab" label={filesLabel} transparent>
<ManuscriptFileList
files={files}
getSignedUrl={getSignedUrl}
......
......@@ -42,7 +42,7 @@ const Step0 = ({
!isUndefined(initialValues) ? (
<Fragment>
<Row mb={2} mt={3}>
<Item data-test-id="sign-up-first-name-id" mr={1} vertical>
<Item data-test-id="sign-up-first-name" mr={1} vertical>
<Label required>First Name</Label>
<ValidatedField
component={TextField}
......@@ -50,7 +50,7 @@ const Step0 = ({
validate={[requiredValidator]}
/>
</Item>
<Item data-test-id="sign-up-last-name-id" ml={1} vertical>
<Item data-test-id="sign-up-last-name" ml={1} vertical>
<Label required>Last Name</Label>
<ValidatedField
component={TextField}
......@@ -61,7 +61,7 @@ const Step0 = ({
</Row>
<Row mb={2}>
<ItemOverrideAlert data-test-id="sign-up-title-id" mr={1} vertical>
<ItemOverrideAlert data-test-id="sign-up-title" mr={1} vertical>
<Label required>Title</Label>
<ValidatedField
component={input => (
......@@ -75,7 +75,7 @@ const Step0 = ({
validate={[requiredValidator]}
/>
</ItemOverrideAlert>
<ItemOverrideAlert data-test-id="sign-up-country-id" ml={1} vertical>
<ItemOverrideAlert data-test-id="sign-up-country" ml={1} vertical>
<Label required>Country</Label>
<ValidatedField
component={input => (
......@@ -92,7 +92,7 @@ const Step0 = ({
</Row>
<Row>
<Item data-test-id="sign-up-affiliation-id" vertical>
<Item data-test-id="sign-up-affiliation" vertical>
<Label required>Affiliation</Label>
<ValidatedField
component={TextField}
......@@ -102,7 +102,7 @@ const Step0 = ({
</Item>
</Row>
<ValidationRow data-test-id="sign-up-agree-TC-id" mb={2}>
<ValidationRow data-test-id="sign-up-agree-TC" mb={2}>
<ValidatedField
component={AgreeCheckbox}
name="agreeTC"
......@@ -124,7 +124,7 @@ const Step0 = ({
</Row>
<Button
data-test-id="sign-up-proceed-to-set-email-and-password-id"
data-test-id="sign-up-proceed-to-set-email-and-password"
mt={4}
onClick={handleSubmit}
>
......
......@@ -12,7 +12,7 @@ const EmailField = input => <TextField {...input} type="email" />
const SignUpForm = () => (
<Fragment>
<Row mb={2}>
<Item data-test-id="sign-up-email-id" vertical>
<Item data-test-id="sign-up-email" vertical>
<Label required>Email</Label>
<ValidatedField
component={EmailField}
......@@ -22,7 +22,7 @@ const SignUpForm = () => (
</Item>
</Row>
<Row mb={2}>
<Item data-test-id="sign-up-password-id" vertical>
<Item data-test-id="sign-up-password" vertical>
<Label required>Password</Label>
<ValidatedField
component={PasswordField}
......@@ -32,7 +32,7 @@ const SignUpForm = () => (
</Item>
</Row>
<Row mb={2}>
<Item data-test-id="sign-up-confirm-password-id" vertical>
<Item data-test-id="sign-up-confirm-password" vertical>
<Label required>Confirm password</Label>
<ValidatedField
component={PasswordField}
......@@ -107,12 +107,12 @@ const Step1 = ({
<Row justify={!withoutBack.includes(type) ? 'space-between' : 'center'}>
{!withoutBack.includes(type) && (
<Button data-test-id="sign-up-back-button-id" onClick={onBack}>
<Button data-test-id="sign-up-back-button" onClick={onBack}>
BACK
</Button>
)}
<Button
data-test-id="sign-up-confirm-button-id"
data-test-id="sign-up-confirm-button"
disabled={submitting}
onClick={handleSubmit}
primary
......
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