1
0
mirror of https://github.com/nolanlawson/pinafore synced 2024-12-11 09:45:24 +01:00
Pinafore-Web-Client-Frontend/tests/spec/032-mute-dialog.js
Nolan Lawson 0649eee366
fix: fix dialogs within dialogs not opening (#1154)
* fix: fix dialogs within dialogs not opening

fixes #1153

* remove console logs
2019-04-14 19:47:30 -07:00

33 lines
938 B
JavaScript

import {
getNthDialogOptionsOption,
getNthStatus, getNthStatusOptionsButton,
modalDialog, sleep, visibleModalDialog
} from '../utils'
import { loginAsFoobar } from '../roles'
fixture`032-mute-dialog.js`
.page`http://localhost:4002`
test('Can open the mute dialog twice', async t => {
await loginAsFoobar(t)
await t
.expect(getNthStatus(1).exists).ok({ timeout: 30000 })
.hover(getNthStatus(1))
.click(getNthStatusOptionsButton(1))
.click(getNthDialogOptionsOption(3))
.expect(visibleModalDialog.innerText).contains('Mute notifications')
await sleep(500)
await t
.pressKey('esc')
.expect(modalDialog.exists).notOk()
await sleep(500)
await t
.click(getNthStatusOptionsButton(1))
.click(getNthDialogOptionsOption(3))
.expect(visibleModalDialog.innerText).contains('Mute notifications')
await sleep(500)
await t
.pressKey('esc')
.expect(modalDialog.exists).notOk()
})