diff --git a/packages/component-faraday-ui/src/ActionLink.js b/packages/component-faraday-ui/src/ActionLink.js index 2f61672b38c201090d65f40eba954d7a6e1a467f..9f27cec30d1ba8e1584fed2f753653c952e23f77 100644 --- a/packages/component-faraday-ui/src/ActionLink.js +++ b/packages/component-faraday-ui/src/ActionLink.js @@ -69,7 +69,6 @@ const ExternalLink = styled.a` text-decoration: underline; } ` - const CustomLink = ExternalLink.withComponent(Link) const Root = styled.div` diff --git a/packages/component-faraday-ui/src/AppBar.js b/packages/component-faraday-ui/src/AppBar.js index f1eef417786cbfbe861325e7bff8e2bb5304ac3d..80dc030cc5b325b62bc929a143d3500009f3a948 100644 --- a/packages/component-faraday-ui/src/AppBar.js +++ b/packages/component-faraday-ui/src/AppBar.js @@ -31,7 +31,7 @@ const AppBar = ({ !isSubmit && currentUser.user && ( <Button - data-test="new-manuscript" + data-test-id="new-manuscript" disabled={!canCreateDraft} ml={2} mr={5} diff --git a/packages/component-faraday-ui/src/AppBarMenu.js b/packages/component-faraday-ui/src/AppBarMenu.js index 48952b453fbd702c5b4ec4257fd8aaa5c61f8ce8..3a3a93ba7b682469bdcd67ff340efc3ebf8996f7 100644 --- a/packages/component-faraday-ui/src/AppBarMenu.js +++ b/packages/component-faraday-ui/src/AppBarMenu.js @@ -75,7 +75,9 @@ const User = styled.div` display: flex; cursor: pointer; ` -const Dropdown = styled.div` +const Dropdown = styled.div.attrs({ + 'data-test-id': props => props['data-test-id'] || 'admin-dropdown', +})` background-color: ${th('appBar.colorBackground')}; border-radius: ${th('borderRadius')}; box-shadow: ${th('boxShadow')}; @@ -86,7 +88,9 @@ const Dropdown = styled.div` z-index: 10; ` -const DropdownOption = styled.div` +const DropdownOption = styled.div.attrs({ + 'data-test-id': props => props['data-test-id'] || 'dropdown-option', +})` align-items: center; color: ${th('colorText')}; cursor: pointer; diff --git a/packages/component-faraday-ui/src/AuthorCard.js b/packages/component-faraday-ui/src/AuthorCard.js index 3778a82ba5217bb4b4a8158baebee8fba68414a7..bb4112cc6cb8edb64be1702b5132d208737f6dc7 100644 --- a/packages/component-faraday-ui/src/AuthorCard.js +++ b/packages/component-faraday-ui/src/AuthorCard.js @@ -158,6 +158,7 @@ const AuthorEdit = ({ <Label required>Email</Label> <ValidatedField component={TextField} + data-test-id="author-card-email" name="email" validate={[required, validators.emailValidator]} /> @@ -166,6 +167,7 @@ const AuthorEdit = ({ <Label required>First name</Label> <ValidatedField component={TextField} + data-test-id="author-card-firstname" name="firstName" validate={[required]} /> @@ -174,6 +176,7 @@ const AuthorEdit = ({ <Label required>Last name</Label> <ValidatedField component={TextField} + data-test-id="author-card-lastname" name="lastName" validate={[required]} /> @@ -182,6 +185,7 @@ const AuthorEdit = ({ <Label required>Affiliation</Label> <ValidatedField component={TextField} + data-test-id="author-card-affiliation" name="affiliation" validate={[required]} /> @@ -192,6 +196,7 @@ const AuthorEdit = ({ component={input => ( <Menu {...input} options={countries} placeholder="Please select" /> )} + data-test-id="author-card-country" name="country" /> </Item> diff --git a/packages/component-faraday-ui/src/AuthorTag.js b/packages/component-faraday-ui/src/AuthorTag.js index de77649af2ef6640b21c315fe8cac3bf78bfa00c..1ac2a56a90bd18468d8235f90746e827801b37fc 100644 --- a/packages/component-faraday-ui/src/AuthorTag.js +++ b/packages/component-faraday-ui/src/AuthorTag.js @@ -7,6 +7,7 @@ import Text from './Text' const AuthorTag = ({ author: { + id, firstName, lastName, isCorresponding, @@ -14,7 +15,7 @@ const AuthorTag = ({ affiliationNumber, }, }) => ( - <Root> + <Root data-test-id={`author-tag-${id}`}> <Text>{`${firstName} ${lastName}`}</Text> {isSubmitting && <Tag>SA</Tag>} {isCorresponding && <Tag>CA</Tag>} diff --git a/packages/component-faraday-ui/src/AuthorTagList.js b/packages/component-faraday-ui/src/AuthorTagList.js index 4e9cd757a62866f19b3c66298d084cee967cd80d..5aea50c288cf1b4dde73988203438d07ad0264d5 100644 --- a/packages/component-faraday-ui/src/AuthorTagList.js +++ b/packages/component-faraday-ui/src/AuthorTagList.js @@ -69,6 +69,7 @@ const AuthorTagList = ({ {withAffiliations && ( <Item flex={0} ml={1}> <ActionLink + data-test-id="author-affiliations" icon={showAffiliation ? 'minus' : 'plus'} onClick={toggleAffiliation} > diff --git a/packages/component-faraday-ui/src/FileSection.js b/packages/component-faraday-ui/src/FileSection.js index 6d799cfa855732275e6b783feb16b1d6b3a78c80..0da010405bfdf934b7c65ee88d17d44e89849397 100644 --- a/packages/component-faraday-ui/src/FileSection.js +++ b/packages/component-faraday-ui/src/FileSection.js @@ -70,6 +70,7 @@ const FileSection = ({ onUpload={onFilePick} > <ActionLink + data-test-id={`add-file-${listId}`} disabled={files.length >= maxFiles} icon="plus" size="small" diff --git a/packages/component-faraday-ui/src/Footer.js b/packages/component-faraday-ui/src/Footer.js index 4a237f254c3afcb9c6c964495c0380ab54cdf75f..15c2d7588cc049f4cc3da02ac990b274665a407a 100644 --- a/packages/component-faraday-ui/src/Footer.js +++ b/packages/component-faraday-ui/src/Footer.js @@ -7,17 +7,30 @@ import { withJournal } from 'xpub-journal' import { ActionLink, Row, Text } from './' const Footer = ({ journal }) => ( - <Root alignItems="center" justify="center"> - <ActionLink to="https://hindawi.com">Hindawi</ActionLink> - <ActionLink ml={3} to="https://www.hindawi.com/privacy/"> + <Root alignItems="center" data-test-id="footer-row-id" justify="center"> + <ActionLink data-test-id="hindawi-redirect" to="https://hindawi.com"> + Hindawi + </ActionLink> + <ActionLink + data-test-id="privacy-policy" + ml={3} + to="https://www.hindawi.com/privacy/" + > Privacy Policy </ActionLink> - <ActionLink ml={3} to="https://www.hindawi.com/terms/"> + <ActionLink + data-test-id="terms-of-service" + ml={3} + to="https://www.hindawi.com/terms/" + > Terms of Service </ActionLink> <Text ml={4} secondary> {`Support: `} - <ActionLink to={`mailto:${get(journal, 'metadata.email')}`}> + <ActionLink + data-test-id="email-support" + to={`mailto:${get(journal, 'metadata.email')}`} + > {get(journal, 'metadata.email')} </ActionLink> </Text> diff --git a/packages/component-faraday-ui/src/Logo.js b/packages/component-faraday-ui/src/Logo.js index 655780803e2c2a3010dd1e243136376af4c6e8d1..338312793bdfef4b08c3b3cdbe138e5591248392 100644 --- a/packages/component-faraday-ui/src/Logo.js +++ b/packages/component-faraday-ui/src/Logo.js @@ -1,9 +1,17 @@ /* eslint-disable jsx-a11y/no-noninteractive-element-interactions */ import React from 'react' +import { get } from 'lodash' -const Logo = ({ src, onClick, title, height = 36 }) => ( - <img alt={title} height={height} onClick={onClick} src={src} title={title} /> +const Logo = ({ src, onClick, title, height = 36, ...rest }) => ( + <img + alt={title} + data-test-id={get(rest, 'data-test-id', 'journal-logo')} + height={height} + onClick={onClick} + src={src} + title={title} + /> ) export default Logo diff --git a/packages/component-faraday-ui/src/PublonsTable.js b/packages/component-faraday-ui/src/PublonsTable.js index ed2ffa47ad5bface693c3f215619034c91ffce86..4b7a53511d9312f03b61f77d11b52a83e8f5b85d 100644 --- a/packages/component-faraday-ui/src/PublonsTable.js +++ b/packages/component-faraday-ui/src/PublonsTable.js @@ -5,7 +5,7 @@ import { th } from '@pubsweet/ui-toolkit' import { Button, Spinner } from '@pubsweet/ui' import { compose, withHandlers, withProps } from 'recompose' -import { Label, OpenModal, Text, withFetching } from '../' +import { Label, OpenModal, Text, withFetching, ActionLink } from '../' const TableView = ({ reviewers, @@ -43,7 +43,11 @@ const TableView = ({ {reviewers.map(reviewer => ( <TableRow key={reviewer.email}> <td> - <Text>{`${get(reviewer, 'name', '')}`}</Text> + <ActionLink + to={get(reviewer, 'profileUrl', 'https://www.publons.com/')} + > + {`${get(reviewer, 'name', '')}`} + </ActionLink> </td> <td> <Text>{`${get(reviewer, 'affiliation', '')}`}</Text> diff --git a/packages/component-faraday-ui/src/SortableList.js b/packages/component-faraday-ui/src/SortableList.js index f6bd63d6e33fc049676783818ffb6378691fb58a..e27f7158f2a2da12943106001a3008542c0b0506 100644 --- a/packages/component-faraday-ui/src/SortableList.js +++ b/packages/component-faraday-ui/src/SortableList.js @@ -60,7 +60,7 @@ const Item = ({ dragHandle ? connectDragPreview( connectDropTarget( - <div style={{ flex: 1 }}> + <div data-test-id={`sortable-item-${rest.id}`} style={{ flex: 1 }}> {React.createElement(listItem, { ...rest, dragHandle: connectDragSource( @@ -74,7 +74,9 @@ const Item = ({ ) : connectDropTarget( connectDragSource( - <div style={{ flex: 1 }}>{React.createElement(listItem, rest)}</div>, + <div data-test-id={`sortable-item-${rest.id}`} style={{ flex: 1 }}> + {React.createElement(listItem, rest)} + </div>, ), ) @@ -101,6 +103,7 @@ const SortableList = ({ <Fragment> {items.map((item, i) => ( <DecoratedItem + data-test-id={`add-author-id-${i}`} dragHandle={dragHandle} index={i} item={item} diff --git a/packages/component-faraday-ui/src/WizardAuthors.js b/packages/component-faraday-ui/src/WizardAuthors.js index 29d3c90a5a53dcb2d49d3fb97653edd0f3abebaf..7ea00f08d3c6b3118b2db4edbcd84bb152977f6a 100644 --- a/packages/component-faraday-ui/src/WizardAuthors.js +++ b/packages/component-faraday-ui/src/WizardAuthors.js @@ -73,7 +73,11 @@ const WizardAuthors = ({ <Row alignItems="center" justify="flex-start"> <Item> <Label>Authors</Label> - <ActionLink icon="plus" onClick={addNewAuthor}> + <ActionLink + data-test-id="add-author" + icon="plus" + onClick={addNewAuthor} + > ADD AUTHOR </ActionLink> </Item> diff --git a/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptAssignHE.js b/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptAssignHE.js index b30f045ad4725e1502b54433ca631d168d17b359..ed9e04dfc0e67bd3844c512eee5a6a49f9b7a0ce 100644 --- a/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptAssignHE.js +++ b/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptAssignHE.js @@ -11,6 +11,7 @@ const ManuscriptAssignHE = ({ }) => canAssignHE ? ( <ContextualBox + data-test-id="assign-handling-editor" expanded={expanded} label="Assign Handling Editor" scrollIntoView diff --git a/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptEicDecision.js b/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptEicDecision.js index 1c40f7107e6358774fcac738b4e62cb0774b16a4..f0e5d8a3fd2392f511108c906a7861d73a73cec8 100644 --- a/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptEicDecision.js +++ b/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptEicDecision.js @@ -49,7 +49,11 @@ const ManuscriptEicDecision = ({ collection = {}, ...rest }) => ( - <ContextualBox label="Your Editorial Decision" {...rest}> + <ContextualBox + data-test-id="your-editorial-decision-id" + label="Your Editorial Decision" + {...rest} + > <Root> <Row justify="flex-start"> <ItemOverrideAlert flex={0} vertical> diff --git a/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptHeader.js b/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptHeader.js index cc79766601a6e3bf1461efb6c0c1eaa294624d95..268d7af507e41a54af7f5dd2088c905a7681d0ca 100644 --- a/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptHeader.js +++ b/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptHeader.js @@ -28,19 +28,34 @@ const ManuscriptHeader = ({ const { title = 'No title', journal = '', type = '' } = metadata return ( <Fragment> - <Row alignItems="baseline" justify="space-between"> + <Row + alignItems="baseline" + data-test-id="manuscript-title" + justify="space-between" + > <H2 mb={1}>{title}</H2> <Tag data-test-id="fragment-status" status> {visibleStatus} </Tag> </Row> {authors.length > 0 && ( - <Row alignItems="center" justify="flex-start" mb={1}> + <Row + alignItems="center" + data-test-id="authors-row" + justify="flex-start" + mb={1} + > <AuthorTagList authors={authors} withAffiliations withTooltip /> </Row> )} <Row alignItems="center" justify="flex-start" mb={1}> - {customId && <Text customId mr={1}>{`ID ${customId}`}</Text>} + {customId && ( + <Text + customId + data-test-id="manuscript-id" + mr={1} + >{`ID ${customId}`}</Text> + )} {submitted && ( <DateParser durationThreshold={0} timestamp={submitted}> {timestamp => <Text mr={3}>Submitted on {timestamp}</Text>} diff --git a/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptMetadata.js b/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptMetadata.js index 205719b95fb817a3b67b0e0d8b18da2e807ca05d..f86208b45f71994aaf8ae38bec91a88df103ed40 100644 --- a/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptMetadata.js +++ b/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptMetadata.js @@ -18,7 +18,12 @@ const ManuscriptMetadata = ({ <Fragment> {!!abstract && ( <Item mb={1}> - <ContextualBox label="Abstract" startExpanded transparent> + <ContextualBox + data-test-id="abstract-tab" + label="Abstract" + startExpanded + transparent + > <Text mb={1} mt={1}> {abstract} </Text> @@ -27,7 +32,11 @@ const ManuscriptMetadata = ({ )} {conflicts.hasConflicts === 'yes' && ( <Item mb={1}> - <ContextualBox label="Conflict of Interest" transparent> + <ContextualBox + data-test-id="conflict-of-interest-tab" + label="Conflict of Interest" + transparent + > <Text mb={1} mt={1}> {get(conflicts, 'message', '')} </Text> @@ -36,7 +45,7 @@ const ManuscriptMetadata = ({ )} {!isEmpty(files) && ( <Item mb={1}> - <ContextualBox label={filesLabel} transparent> + <ContextualBox data-test-id="files-tab" label={filesLabel} transparent> <ManuscriptFileList files={files} getSignedUrl={getSignedUrl} diff --git a/packages/component-faraday-ui/src/modals/MultiAction.js b/packages/component-faraday-ui/src/modals/MultiAction.js index f441ad6ec0ac2d61aaa4fa968ac4d7648ef26d38..3a9acf7d332be3e39d6270cdde72fbf637e81b57 100644 --- a/packages/component-faraday-ui/src/modals/MultiAction.js +++ b/packages/component-faraday-ui/src/modals/MultiAction.js @@ -36,8 +36,10 @@ const MultiAction = ({ <Spinner size={3} /> ) : ( <Fragment> - <Button onClick={onClose}>{cancelText}</Button> - <Button onClick={onConfirm} primary> + <Button data-test-id="modal-cancel" onClick={onClose}> + {cancelText} + </Button> + <Button data-test-id="modal-confirm" onClick={onConfirm} primary> {confirmText} </Button> </Fragment> diff --git a/packages/component-faraday-ui/src/modals/SingleActionModal.js b/packages/component-faraday-ui/src/modals/SingleActionModal.js index 49a9ec10906007ff593dcb0b087be7016f76b89d..44385a9e75b20df802e0bb1c0248563ad84b4bb2 100644 --- a/packages/component-faraday-ui/src/modals/SingleActionModal.js +++ b/packages/component-faraday-ui/src/modals/SingleActionModal.js @@ -21,7 +21,7 @@ const SingleActionModal = ({ </Icon> {title && <H2>{title}</H2>} {subtitle && <Text secondary>{subtitle}</Text>} - <Button onClick={onClick} primary> + <Button data-test-id="modal-confirm" onClick={onClick} primary> {confirmText} </Button> </Root> diff --git a/packages/component-wizard/src/components/SubmissionConfirmation.js b/packages/component-wizard/src/components/SubmissionConfirmation.js index f258b3153b15f1ba55b10483605929af2042a20f..032f737a3aedf8c580defb29364bd82d56f3227c 100644 --- a/packages/component-wizard/src/components/SubmissionConfirmation.js +++ b/packages/component-wizard/src/components/SubmissionConfirmation.js @@ -23,7 +23,11 @@ const SubmissionConfirmation = ({ history, journal }) => ( </Text> </Row> <Row justify="center"> - <Button onClick={() => history.push('/')} primary> + <Button + data-test-id="go-to-dashboard" + onClick={() => history.push('/')} + primary + > GO TO DASHBOARD </Button> </Row> diff --git a/packages/components-faraday/src/components/Admin/AdminUsers.js b/packages/components-faraday/src/components/Admin/AdminUsers.js index 0fc5130192cda78f6ac5dba1b246dde4d7d1bc86..b29d70d4221431fbfdb750fbd965ccbb13dd00b0 100644 --- a/packages/components-faraday/src/components/Admin/AdminUsers.js +++ b/packages/components-faraday/src/components/Admin/AdminUsers.js @@ -45,7 +45,12 @@ const Users = ({ <Fragment> <Row alignItems="center" justify="space-between" mb={1}> <Item alignItems="center"> - <ActionLink icon="arrow-left" mr={2} onClick={history.goBack}> + <ActionLink + data-test-id="go-to-dashboard" + icon="arrow-left" + mr={2} + onClick={history.goBack} + > Admin Dashboard </ActionLink> <AddUser diff --git a/packages/components-faraday/src/components/Dashboard/DashboardFilters.js b/packages/components-faraday/src/components/Dashboard/DashboardFilters.js index f9b3bab6f8aedca1accd5c05b3fd2beb4df5d314..2f1794281d784ee183df364b9322a61c56c5f251 100644 --- a/packages/components-faraday/src/components/Dashboard/DashboardFilters.js +++ b/packages/components-faraday/src/components/Dashboard/DashboardFilters.js @@ -8,7 +8,13 @@ const DashboardFilters = ({ changeFilterValue, getDefaultFilterValue, }) => ( - <Row alignItems="flex-end" justify="flex-start" mb={1} mt={2}> + <Row + alignItems="flex-end" + data-test-id="dashboard-filters" + justify="flex-start" + mb={1} + mt={2} + > <Text mr={1} pb={1} secondary> Filters </Text> diff --git a/packages/components-faraday/src/components/SignUp/SignUpStep0.js b/packages/components-faraday/src/components/SignUp/SignUpStep0.js index 51edb75af1575d53e615c6cff9db1f7081b682ca..f17aabd46a27554e01396ab0369eb5b3124769fd 100644 --- a/packages/components-faraday/src/components/SignUp/SignUpStep0.js +++ b/packages/components-faraday/src/components/SignUp/SignUpStep0.js @@ -42,7 +42,7 @@ const Step0 = ({ !isUndefined(initialValues) ? ( <Fragment> <Row mb={2} mt={3}> - <Item 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 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 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 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 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 mb={2}> + <ValidationRow data-test-id="sign-up-agree-TC" mb={2}> <ValidatedField component={AgreeCheckbox} name="agreeTC" @@ -123,7 +123,11 @@ const Step0 = ({ </Text> </Row> - <Button mt={4} onClick={handleSubmit}> + <Button + data-test-id="sign-up-proceed-to-set-email-and-password" + mt={4} + onClick={handleSubmit} + > PROCEED TO SET {type === 'signup' && 'EMAIL AND'} PASSWORD </Button> diff --git a/packages/components-faraday/src/components/SignUp/SignUpStep1.js b/packages/components-faraday/src/components/SignUp/SignUpStep1.js index a9d6d4625b1fd6ca485b7de67d7765154a1bc020..2b704892b11d80f05b88ea4007b45d5ce8e9e0a5 100644 --- a/packages/components-faraday/src/components/SignUp/SignUpStep1.js +++ b/packages/components-faraday/src/components/SignUp/SignUpStep1.js @@ -12,7 +12,7 @@ const EmailField = input => <TextField {...input} type="email" /> const SignUpForm = () => ( <Fragment> <Row mb={2}> - <Item 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 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 vertical> + <Item data-test-id="sign-up-confirm-password" vertical> <Label required>Confirm password</Label> <ValidatedField component={PasswordField} @@ -106,8 +106,17 @@ const Step1 = ({ <Row /> <Row justify={!withoutBack.includes(type) ? 'space-between' : 'center'}> - {!withoutBack.includes(type) && <Button onClick={onBack}>BACK</Button>} - <Button disabled={submitting} onClick={handleSubmit} primary> + {!withoutBack.includes(type) && ( + <Button data-test-id="sign-up-back-button" onClick={onBack}> + BACK + </Button> + )} + <Button + data-test-id="sign-up-confirm-button" + disabled={submitting} + onClick={handleSubmit} + primary + > {onSubmitText} </Button> </Row> diff --git a/packages/components-faraday/src/components/UIComponents/EQSDecisionPage.js b/packages/components-faraday/src/components/UIComponents/EQSDecisionPage.js index ed37e20705475698d9d47fa0543fa819d00fe3c4..a2c978f8660d924d2b7b27bbadd607b8a6a27995 100644 --- a/packages/components-faraday/src/components/UIComponents/EQSDecisionPage.js +++ b/packages/components-faraday/src/components/UIComponents/EQSDecisionPage.js @@ -34,7 +34,7 @@ const sizeValidator = manuscriptIdSizeValidator(7) const Enhanched = () => ( <Row> - <Item vertical> + <Item data-test-id="manuscript-id" vertical> <Label required>Manuscript ID</Label> <ValidatedField component={TextField} @@ -77,7 +77,7 @@ const FormModal = reduxForm({ title="Accept Manuscript" > {showModal => ( - <Button onClick={showModal} primary> + <Button data-test-id="eqs-yes-button" onClick={showModal} primary> YES </Button> )} @@ -116,7 +116,11 @@ const EQSDecisionPage = ({ subtitle="Are you sure you want to reject this manuscript?" title="Reject manuscript" > - {showModal => <Button onClick={showModal}>NO</Button>} + {showModal => ( + <Button data-test-id="eqs-no-button" onClick={showModal}> + NO + </Button> + )} </OpenModal> <FormModal isFetching={isFetching}