make test less flakey

This commit is contained in:
Nolan Lawson 2018-03-30 08:19:18 -07:00
parent 5a0c4897b0
commit 42a467ffc8

View file

@ -11,7 +11,8 @@ test('can compose using a dialog', async t => {
await t.useRole(foobarRole) await t.useRole(foobarRole)
await scrollToStatus(t, 15) await scrollToStatus(t, 15)
await t.expect(modalDialog.getAttribute('aria-hidden')).eql('true') await t.expect(modalDialog.getAttribute('aria-hidden')).eql('true')
await sleep(1000) .expect(composeButton.getAttribute('aria-label')).eql('Compose')
await sleep(2000)
await t.click(composeButton) await t.click(composeButton)
.expect(modalDialog.hasAttribute('aria-hidden')).notOk() .expect(modalDialog.hasAttribute('aria-hidden')).notOk()
.typeText(modalDialog.find('.compose-box-input'), 'hello from the modal') .typeText(modalDialog.find('.compose-box-input'), 'hello from the modal')