test: make follow request test less flaky (#1558)

This commit is contained in:
Nolan Lawson 2019-10-08 05:59:55 -07:00 committed by GitHub
parent 0b5adfa2c9
commit 10b43b209c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -28,16 +28,15 @@ async function resetFollows () {
} }
test('Can approve and reject follow requests', async t => { test('Can approve and reject follow requests', async t => {
await loginAsLockedAccount(t)
await resetFollows() await resetFollows()
await sleep(2000)
await Promise.all([ await Promise.all([
followAs('admin', 'LockedAccount'), followAs('admin', 'LockedAccount'),
followAs('baz', 'LockedAccount'), followAs('baz', 'LockedAccount'),
followAs('quux', 'LockedAccount') followAs('quux', 'LockedAccount')
]) ])
await sleep(2000) await sleep(2000)
await loginAsLockedAccount(t)
await t await t
.expect(communityNavButton.getAttribute('aria-label')).eql('Community (3 follow requests)') .expect(communityNavButton.getAttribute('aria-label')).eql('Community (3 follow requests)')