From 07d8045617365119a7f978730e6434445c0c8573 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Mon, 7 Oct 2019 07:15:12 -0700 Subject: [PATCH] test: make test less flaky (#1553) * test: make test less flaky * fixup * fix lint --- tests/spec/014-compose-post-privacy.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/spec/014-compose-post-privacy.js b/tests/spec/014-compose-post-privacy.js index 309469e4..a6997c73 100644 --- a/tests/spec/014-compose-post-privacy.js +++ b/tests/spec/014-compose-post-privacy.js @@ -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)') })