Commit 93ef57b3 authored by Ana Ellis's avatar Ana Ellis

feat: new submission test, removed commented code

parent 97ad04e3
......@@ -30,9 +30,13 @@ test.skip('Manage submissions journey, create new submission', async t => {
)
.ok()
await t.typeText(submission.title, title, { replace: true })
await t
.typeText(submission.title, 'this is an test submission', { replace: true })
//.typeText(submission.abstract, faker.lorem.words(50))
.typeText(
...(await prepareEditor(submission.abstract, faker.lorem.words(50))),
)
.pressKey('tab')
.click(submission.addAuthor)
.typeText(submission.authorFirstName, 'John')
.typeText(submission.authorLastName, 'Cena')
......@@ -51,8 +55,9 @@ test.skip('Manage submissions journey, create new submission', async t => {
.click(submission.researchNexusOptions.nth(1))
.click(submission.preregisteredOptions.nth(0))
await t
.typeText(
...(await prepareEditor(submission.fundingAcknowledgement, 'chur buddy')),
...(await prepareEditor(submission.fundingAcknowledgement, 'thank you')),
)
//.click(submission.submit)
.click(submission.reallySubmit)
......
......@@ -2,9 +2,11 @@ import { Selector } from 'testcafe'
import ReactSelector from 'testcafe-react-selectors'
const submission = {
collabraHome: Selector('a'),
title: Selector('div[id="metadata.title"] div[contenteditable=true]'),
abstract: Selector('div[id="metadata.abstract"] div[contenteditable=true]'),
addAuthor: Selector('div[id="metadata.authors"] button[type=button]'),
//addAuthor: Selector('div[id="metadata.authors"] button[type=button]'),
addAuthor: Selector('button[type=button]').withText('Add another author'),
authorFirstName: Selector(
'div[id="metadata.authors"] input[name="metadata.authors[0].firstName"]',
),
......
Markdown is supported
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