chore: make test less flaky (#1038)
This commit is contained in:
parent
547ee14f88
commit
31a6ec6857
|
@ -75,9 +75,12 @@ test('notification timeline preserves focus', async t => {
|
||||||
})
|
})
|
||||||
|
|
||||||
test('thread preserves focus', async t => {
|
test('thread preserves focus', async t => {
|
||||||
|
const timeout = 30000
|
||||||
|
|
||||||
await loginAsFoobar(t)
|
await loginAsFoobar(t)
|
||||||
await t
|
await t
|
||||||
.navigateTo('/accounts/3')
|
.navigateTo('/accounts/3')
|
||||||
|
.expect(getNthStatus(0).exists).ok({ timeout })
|
||||||
.hover(getNthStatus(0))
|
.hover(getNthStatus(0))
|
||||||
await scrollToStatus(t, 2)
|
await scrollToStatus(t, 2)
|
||||||
await t.click(getNthStatus(2))
|
await t.click(getNthStatus(2))
|
||||||
|
@ -91,12 +94,12 @@ test('thread preserves focus', async t => {
|
||||||
.expect(getActiveElementInsideNthStatus()).eql('24')
|
.expect(getActiveElementInsideNthStatus()).eql('24')
|
||||||
.hover(getNthStatus(23))
|
.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({ timeout })
|
||||||
await goBack()
|
await goBack()
|
||||||
await t.expect($(`${getNthStatusSelector(24)} .status-absolute-date`).exists).ok()
|
await t.expect($(`${getNthStatusSelector(24)} .status-absolute-date`).exists).ok({ timeout })
|
||||||
.expect(getActiveElementClassList()).contains('status-article')
|
.expect(getActiveElementClassList()).contains('status-article', { timeout })
|
||||||
.expect(getActiveElementClassList()).contains('status-in-timeline')
|
.expect(getActiveElementClassList()).contains('status-in-timeline', { timeout })
|
||||||
.expect(getActiveElementInsideNthStatus()).eql('23')
|
.expect(getActiveElementInsideNthStatus()).eql('23', { timeout })
|
||||||
})
|
})
|
||||||
|
|
||||||
test('reply preserves focus and moves focus to the text input', async t => {
|
test('reply preserves focus and moves focus to the text input', async t => {
|
||||||
|
|
Loading…
Reference in a new issue