test: make test less flaky (#1553)

* test: make test less flaky

* fixup

* fix lint
This commit is contained in:
Nolan Lawson 2019-10-07 07:15:12 -07:00 committed by GitHub
parent d53430fee5
commit 07d8045617
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -13,12 +13,15 @@ fixture`014-compose-post-privacy.js`
test('Changes post privacy', async t => {
await loginAsFoobar(t)
await sleep(2000)
await t
.expect(postPrivacyButton.getAttribute('aria-label')).eql('Adjust privacy (currently Public)')
.click(postPrivacyButton)
.expect(getNthPostPrivacyOptionInDialog(2).exists).ok({ timeout: 30000 })
.click(getNthPostPrivacyOptionInDialog(2))
.expect(postPrivacyButton.getAttribute('aria-label')).eql('Adjust privacy (currently Unlisted)')
.click(postPrivacyButton)
.expect(getNthPostPrivacyOptionInDialog(1).exists).ok({ timeout: 30000 })
.click(getNthPostPrivacyOptionInDialog(1))
.expect(postPrivacyButton.getAttribute('aria-label')).eql('Adjust privacy (currently Public)')
})