test: fix flakey notification test (#1958)

This commit is contained in:
Nolan Lawson 2021-02-15 16:45:51 -08:00 committed by GitHub
parent b451093ece
commit ddd565c708
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -43,6 +43,7 @@ test('Notification timeline filters correctly affect counts - favs', async t =>
await loginAsFoobar(t) await loginAsFoobar(t)
await 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')
await sleep(500)
await favoriteStatusAs('admin', statusId) await favoriteStatusAs('admin', statusId)
await t await t
.expect(notificationBadge.innerText).eql('1', { timeout }) .expect(notificationBadge.innerText).eql('1', { timeout })
@ -62,6 +63,7 @@ test('Notification timeline filters correctly affect counts - favs', async t =>
await loginAsFoobar(t) await loginAsFoobar(t)
await t await t
.expect(getNthStatusContent(1).exists).ok() .expect(getNthStatusContent(1).exists).ok()
await sleep(500)
await postAs('admin', 'hey yo @foobar') await postAs('admin', 'hey yo @foobar')
await t await t
.expect(notificationBadge.innerText).eql('1', { timeout }) .expect(notificationBadge.innerText).eql('1', { timeout })
@ -81,6 +83,7 @@ test('Notification timeline filters correctly affect counts - follows', async t
await loginAsFoobar(t) await loginAsFoobar(t)
await t await t
.expect(getNthStatusContent(1).exists).ok() .expect(getNthStatusContent(1).exists).ok()
await sleep(500)
await followAs('ExternalLinks', 'foobar') await followAs('ExternalLinks', 'foobar')
await t await t
.expect(notificationBadge.innerText).eql('1', { timeout }) .expect(notificationBadge.innerText).eql('1', { timeout })