Commit 0dfef377 authored by Ana Ellis's avatar Ana Ellis

feat: new submission test, switch branches

parent 92c93b45
......@@ -20,10 +20,11 @@ fixture
})
.afterEach(teardown)
test.skip('Manage submissions journey, create new submission', async t => {
test('Manage submissions journey, create new submission', async t => {
await t.expect(Selector(dashboard.mySubmissionsTitle).exists).notOk()
await t
.debug()
.setFilesToUpload(dashboard.createSubmission, ['./testSubmission1.docx'])
.wait(30000)
.expect(
......@@ -114,7 +115,8 @@ test.skip('Manage submissions journey, create new submission', async t => {
.ok()
})
test.before(async t => {
test.skip
.before(async t => {
startServer
const result = await setup()
......@@ -128,12 +130,16 @@ test.before(async t => {
author = result.userData
await login.doLogin(author.username, author.password)
})('Manage submissions journey, failed new submission', async t => {
})('Manage submissions journey, failed new submission', async t => {
await t
.setFilesToUpload(dashboard.createSubmission, ['./testSubmission1.docx'])
.wait(1560)
.expect(await Selector(dashboard.uploadError).innerText)
.eql('Internal Server Error')
await t.wait(3000).expect(dashboard.createSubmission).exists
})
.expect(await Selector('div').withText('Internal Server Error').exists)
await t.expect(dashboard.createSubmission).exists
})
.after(async t => {
config.util.extendDeep(
{},
JSON.parse(JSON.stringify(config.get('pubsweet-component-ink-backend'))),
JSON.parse(JSON.stringify(config.get('pubsweet-component-ink-backend'))),
)
})
......@@ -8,7 +8,6 @@ const dashboard = {
createSubmission: Selector('input'),
input: Selector('input[type=file]'),
uploadError: Selector('#root div div div div'),
mySubmissionsTitle: Selector('#root div div div div').child(2),
mySubmissions: Selector('#root div div div div'),
......
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