From c5de6739909adde5492e703aed73963c5c72c74e Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Sun, 4 Jul 2021 17:42:43 -0700 Subject: [PATCH] test: improve flaky tests (#2067) --- tests/spec/125-notification-timeline-filters.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/spec/125-notification-timeline-filters.js b/tests/spec/125-notification-timeline-filters.js index 260c3d23..389a92b3 100644 --- a/tests/spec/125-notification-timeline-filters.js +++ b/tests/spec/125-notification-timeline-filters.js @@ -40,9 +40,12 @@ test('Notification timeline filters correctly affect counts - boosts', async t = test('Notification timeline filters correctly affect counts - favs', async t => { const timeout = 20000 const { id: statusId } = await postAs('foobar', 'I do not care if you fav this') + await sleep(500) await loginAsFoobar(t) await t - .expect(getNthStatusContent(1).innerText).contains('I do not care if you fav this') + .expect(getNthStatusContent(1).innerText).contains('I do not care if you fav this', { + timeout + }) await sleep(500) await favoriteStatusAs('admin', statusId) await t @@ -58,11 +61,11 @@ test('Notification timeline filters correctly affect counts - favs', async t => .expect(notificationBadge.innerText).eql('1', { timeout }) }) -test('Notification timeline filters correctly affect counts - favs', async t => { +test('Notification timeline filters correctly affect counts - mentions', async t => { const timeout = 20000 await loginAsFoobar(t) await t - .expect(getNthStatusContent(1).exists).ok() + .expect(getNthStatusContent(1).exists).ok({ timeout }) await sleep(500) await postAs('admin', 'hey yo @foobar') await t @@ -82,7 +85,7 @@ test('Notification timeline filters correctly affect counts - follows', async t const timeout = 20000 await loginAsFoobar(t) await t - .expect(getNthStatusContent(1).exists).ok() + .expect(getNthStatusContent(1).exists).ok({ timeout }) await sleep(500) await followAs('ExternalLinks', 'foobar') await t