test: improve flakiness of report ui test (#1117)
This commit is contained in:
parent
059b455451
commit
5a9d047019
|
@ -1,6 +1,6 @@
|
||||||
import {
|
import {
|
||||||
accountProfileMoreOptionsButton,
|
accountProfileMoreOptionsButton,
|
||||||
confirmationDialogCancelButton,
|
confirmationDialogCancelButton, getNthStatus,
|
||||||
getNthStatusOptionsButton,
|
getNthStatusOptionsButton,
|
||||||
modalDialog
|
modalDialog
|
||||||
} from '../utils'
|
} from '../utils'
|
||||||
|
@ -13,10 +13,13 @@ fixture`028-report-ui.js`
|
||||||
test('Can open a report UI from a status', async t => {
|
test('Can open a report UI from a status', async t => {
|
||||||
await loginAsFoobar(t)
|
await loginAsFoobar(t)
|
||||||
await t
|
await t
|
||||||
|
.hover(getNthStatus(1))
|
||||||
.click(getNthStatusOptionsButton(1))
|
.click(getNthStatusOptionsButton(1))
|
||||||
.click($('.modal-dialog button').withText('Report'))
|
.click($('.modal-dialog button').withText('Report'))
|
||||||
.expect(modalDialog.innerText).contains('You are reporting @quux')
|
.expect(modalDialog.innerText).contains('You are reporting @quux')
|
||||||
.expect(modalDialog.find('.recent-statuses').innerText).contains('pinned toot 2')
|
.expect(modalDialog.find('.recent-statuses').innerText).contains('pinned toot 2', {
|
||||||
|
timeout: 30000
|
||||||
|
})
|
||||||
.click(confirmationDialogCancelButton)
|
.click(confirmationDialogCancelButton)
|
||||||
.expect(modalDialog.exists).notOk()
|
.expect(modalDialog.exists).notOk()
|
||||||
})
|
})
|
||||||
|
@ -28,7 +31,9 @@ test('Can open a report UI from an account', async t => {
|
||||||
.click(accountProfileMoreOptionsButton)
|
.click(accountProfileMoreOptionsButton)
|
||||||
.click($('.modal-dialog button').withText('Report'))
|
.click($('.modal-dialog button').withText('Report'))
|
||||||
.expect(modalDialog.innerText).contains('You are reporting @quux')
|
.expect(modalDialog.innerText).contains('You are reporting @quux')
|
||||||
.expect(modalDialog.find('.recent-statuses').innerText).contains('pinned toot 2')
|
.expect(modalDialog.find('.recent-statuses').innerText).contains('pinned toot 2', {
|
||||||
|
timeout: 30000
|
||||||
|
})
|
||||||
.click(confirmationDialogCancelButton)
|
.click(confirmationDialogCancelButton)
|
||||||
.expect(modalDialog.exists).notOk()
|
.expect(modalDialog.exists).notOk()
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue