tests: improve flakiness in basic timeline spec (#378)

This commit is contained in:
Nolan Lawson 2018-06-08 21:53:45 -07:00 committed by GitHub
parent ffab599f31
commit 08ad25f677
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -13,6 +13,8 @@ fixture`003-basic-timeline-spec.js`
test('Shows the home timeline', async t => { test('Shows the home timeline', async t => {
await loginAsFoobar(t) await loginAsFoobar(t)
await t await t
.expect(getUrl()).eql('http://localhost:4002/')
.expect(getNthStatus(0).exists).ok({timeout: 30000})
.hover(getNthStatus(0)) .hover(getNthStatus(0))
.expect(getFirstVisibleStatus().exists).ok() .expect(getFirstVisibleStatus().exists).ok()
.expect(getFirstVisibleStatus().hasAttribute('aria-setsize')).ok() .expect(getFirstVisibleStatus().hasAttribute('aria-setsize')).ok()
@ -26,6 +28,8 @@ test('Shows the home timeline', async t => {
test('Shows notifications', async t => { test('Shows notifications', async t => {
await loginAsFoobar(t) await loginAsFoobar(t)
await t await t
.expect(getUrl()).eql('http://localhost:4002/')
.expect(getNthStatus(0).exists).ok({timeout: 30000})
.click(notificationsNavButton) .click(notificationsNavButton)
.expect(getUrl()).contains('/notifications') .expect(getUrl()).contains('/notifications')
@ -35,6 +39,8 @@ test('Shows notifications', async t => {
test('Shows the local timeline', async t => { test('Shows the local timeline', async t => {
await loginAsFoobar(t) await loginAsFoobar(t)
await t await t
.expect(getUrl()).eql('http://localhost:4002/')
.expect(getNthStatus(0).exists).ok({timeout: 30000})
.click(localTimelineNavButton) .click(localTimelineNavButton)
.expect(getUrl()).contains('/local') .expect(getUrl()).contains('/local')
@ -44,6 +50,8 @@ test('Shows the local timeline', async t => {
test('Shows the federated timeline', async t => { test('Shows the federated timeline', async t => {
await loginAsFoobar(t) await loginAsFoobar(t)
await t await t
.expect(getUrl()).eql('http://localhost:4002/')
.expect(getNthStatus(0).exists).ok({timeout: 30000})
.click(communityNavButton) .click(communityNavButton)
.expect(getUrl()).contains('/community') .expect(getUrl()).contains('/community')
.click($('a').withText('Federated')) .click($('a').withText('Federated'))
@ -55,6 +63,8 @@ test('Shows the federated timeline', async t => {
test('Shows favorites', async t => { test('Shows favorites', async t => {
await loginAsFoobar(t) await loginAsFoobar(t)
await t await t
.expect(getUrl()).eql('http://localhost:4002/')
.expect(getNthStatus(0).exists).ok({timeout: 30000})
.click(communityNavButton) .click(communityNavButton)
.expect(getUrl()).contains('/community') .expect(getUrl()).contains('/community')
.click($('a').withText('Favorites')) .click($('a').withText('Favorites'))