Commit 3daa03c9 authored by Ana Ellis's avatar Ana Ellis
Browse files

feat: tidy up lint comments

parent 3095c06e
Pipeline #7670 failed with stages
in 5 minutes and 16 seconds
......@@ -77,9 +77,9 @@ export async function setupWithTwoSubmittedManuscriptsReviewerAssigned() {
},
reviewers: [
{
id: '028ef3a7-3582-4511-a844-30c3685efb3', //not sure where this is from
id: '028ef3a7-3582-4511-a844-30c3685efb3',
_user: {
id: user.id, //should be user.id
id: user.id,
type: 'user',
admin: user.admin,
email: user.email,
......@@ -93,10 +93,10 @@ export async function setupWithTwoSubmittedManuscriptsReviewerAssigned() {
'Sat Jun 23 2018 21:27:22 GMT+1200 (New Zealand Standard Time)',
},
status: 'invited',
reviewer: '028ef3a7-3582-4511-a844-30c3685efb4', // should match _reviewer.id
reviewer: '028ef3a7-3582-4511-a844-30c3685efb4',
_reviewer: {
id: '028ef3a7-3582-4511-a844-30c3685efb4', // should match reviewer as above
user: user.id, //should be user.id
id: '028ef3a7-3582-4511-a844-30c3685efb4',
user: user.id,
},
},
],
......
......@@ -35,10 +35,8 @@ const dashboard = {
myReviewsTitle: Selector('#root div div div div div').child(2),
myReviews: Selector('#root div div div div'),
review: n => dashboard.myReviews.child(n), //specified review
review: n => dashboard.myReviews.child(n),
//#root > div > div > div > div > div:nth-child(2) > div:nth-child(3) > div.sc-esOvli.fmvhd > div.sc-fAjcbJ.dqylwE > div:nth-child(1) > a
//#root > div > div > div > div > div:nth-child(3) > div:nth-child(3) > div > div.sc-exAgwC.kvVgIg > div:nth-child(1) > button
acceptReview: n =>
dashboard.myReviews
.child(n)
......@@ -62,7 +60,7 @@ const dashboard = {
myManuscriptsTitle: Selector('#root div div div div').child(3),
myManuscripts: Selector('#root div div div div'),
manuscript: n => dashboard.myManuscripts.child(n), // specified manuscript
manuscript: n => dashboard.myManuscripts.child(n),
manuscriptStatus: n =>
dashboard.myManuscripts
.child(n)
......
......@@ -69,9 +69,6 @@ test.before(async t => {
await setupWithTwoSubmittedManuscriptsReviewerAssigned()
await login.doLogin(user.username, user.password)
})('Accept and Reject a review', async t => {
//2. there should be two manuscripts in the My Reviews section
//3. both manuscripts in the My Reviews section should show an accept / reject option
await t
.expect(Selector(dashboard.review(0)).exists)
.ok()
......@@ -88,26 +85,16 @@ test.before(async t => {
.expect(Selector(dashboard.rejectReview(1)).exists)
.ok()
//4. click on reject for the first manuscript
//5. the rejected manuscript should not be in the list anymore
await t
// rejected manuscript should not be in the My Reviews list anymore ?
// current behaviour actually replaces the accept/reject links with a singular readonly 'rejected' string
.click(dashboard.rejectReview(0))
.wait(2000)
// await t
// .expect(Selector(dashboard.acceptReview(0)).exists)
// .notOk()
// .expect(Selector(dashboard.rejectReview(0)).exists)
// .notOk()
//6. click on accept for the second manuscript
//7. the accept/reject option for the second manuscript should not be replaced by a link to the reviewer page
.expect(Selector('div').innerText)
.contains('rejected')
await t
.click(dashboard.acceptReview(1)) //for the second manuscript
.click(dashboard.acceptReview(1))
.expect(Selector(dashboard.acceptReview(1)).exists)
.notOk()
.expect(Selector(dashboard.rejectReview(1)).exists)
......@@ -115,9 +102,6 @@ test.before(async t => {
.expect(Selector(dashboard.doReview(1)).exists)
.ok()
//8. click on link
//9, verify you are taken to the reviewer page
await t
.click(dashboard.doReview(2))
.wait(1000)
......
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