chore(tests): make focus test less flaky (#708)

This commit is contained in:
Nolan Lawson 2018-12-01 12:56:55 -08:00 committed by GitHub
parent 153e4f4fcd
commit a760687c6d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -77,6 +77,7 @@ test('thread preserves focus', async t => {
await loginAsFoobar(t) await loginAsFoobar(t)
await t await t
.navigateTo('/accounts/3') .navigateTo('/accounts/3')
.hover(getNthStatus(0))
await scrollToStatus(t, 2) await scrollToStatus(t, 2)
await t.click(getNthStatus(2)) await t.click(getNthStatus(2))
.expect(getUrl()).contains('/statuses/') .expect(getUrl()).contains('/statuses/')
@ -87,6 +88,7 @@ test('thread preserves focus', async t => {
.expect(getNthStatus(24).exists).ok() .expect(getNthStatus(24).exists).ok()
.expect(getActiveElementClass()).contains('status-sidebar') .expect(getActiveElementClass()).contains('status-sidebar')
.expect(getActiveElementInsideNthStatus()).eql('24') .expect(getActiveElementInsideNthStatus()).eql('24')
.hover(getNthStatus(23))
.click(getNthStatus(23)) .click(getNthStatus(23))
.expect($(`${getNthStatusSelector(23)} .status-absolute-date`).exists).ok() .expect($(`${getNthStatusSelector(23)} .status-absolute-date`).exists).ok()
await goBack() await goBack()