1
0
mirror of https://github.com/nolanlawson/pinafore synced 2024-12-11 09:45:24 +01:00
Pinafore-Web-Client-Frontend/tests/spec/136-empty-list.js
Nolan Lawson 430ab4db4c
fix: empty timelines no longer show infinite loading spinner (#1854)
Instead, they now show "Nothing to show." I only fixed this for VirtualList because List should never be non-empty (threads).

Fixes #1763
2020-08-30 18:08:55 -07:00

23 lines
706 B
JavaScript

import {
getNthStatus, sleep,
timeline
} from '../utils'
import { loginAsFoobar } from '../roles'
import { postStatusWithMediaAs } from '../serverActions'
fixture`136-empty-list.js`
.page`http://localhost:4002`
test('An empty list can become non-empty as results stream in', async t => {
await loginAsFoobar(t)
await t
.expect(getNthStatus(1).exists).ok()
.navigateTo('/tags/sweetkitty')
.expect(timeline.innerText).contains('Nothing to show.')
await sleep(500)
await postStatusWithMediaAs('quux', 'look at this sweet kitty #sweetkitty', 'kitten2.jpg', 'hello kitty')
await t
.expect(getNthStatus(1).innerText).contains('look at this sweet kitty', { timeout: 20000 })
})