Commit 944cbf8d authored by Ana Ellis's avatar Ana Ellis
Browse files

feat: tests for other review submission options

parent 37c7a99b
Pipeline #7700 failed with stages
in 7 minutes and 56 seconds
......@@ -24,7 +24,7 @@ fixture
})
.afterEach(teardown)
test.skip
test
.before(async t => {
const result = await setup()
author = result.userData
......
......@@ -140,3 +140,65 @@ test.before(async t => {
.expect(Selector(review.confidentialComments).exists)
.notOk()
})
test.before(async t => {
await setupWithOneAcceptedReview()
await login.doLogin(user.username, user.password)
})('Submit a review', async t => {
await t
.expect(Selector(dashboard.doReview(0)).exists)
.ok()
.click(dashboard.doReview(0))
.wait(2000)
await t
.expect(Selector(review.recommendationLabel).exists)
.ok()
.typeText(review.comments, faker.lorem.words(3))
.pressKey('tab')
.typeText(review.confidentialComments, faker.lorem.words(3))
.pressKey('tab')
.click(review.accept)
.click(review.submit)
.wait(1000) // redirects to dashboard
.expect(Selector(dashboard.completedReview(0)).exists)
.ok()
.click(dashboard.completedReview(0))
.expect(Selector(review.recommendationLabel).exists)
.ok()
.expect(Selector(review.comments).exists)
.notOk()
.expect(Selector(review.confidentialComments).exists)
.notOk()
})
test.before(async t => {
await setupWithOneAcceptedReview()
await login.doLogin(user.username, user.password)
})('Submit a review', async t => {
await t
.expect(Selector(dashboard.doReview(0)).exists)
.ok()
.click(dashboard.doReview(0))
.wait(2000)
await t
.expect(Selector(review.recommendationLabel).exists)
.ok()
.typeText(review.comments, faker.lorem.words(3))
.pressKey('tab')
.typeText(review.confidentialComments, faker.lorem.words(3))
.pressKey('tab')
.click(review.reject)
.click(review.submit)
.wait(1000) // redirects to dashboard
.expect(Selector(dashboard.completedReview(0)).exists)
.ok()
.click(dashboard.completedReview(0))
.expect(Selector(review.recommendationLabel).exists)
.ok()
.expect(Selector(review.comments).exists)
.notOk()
.expect(Selector(review.confidentialComments).exists)
.notOk()
})
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