pinafore/tests/spec/039-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

29 lines
804 B
JavaScript

import {
communityNavButton,
getUrl, timeline
} from '../utils'
import { loginAsFoobar } from '../roles'
import { Selector as $ } from 'testcafe'
fixture`039-empty-list.js`
.page`http://localhost:4002`
test('Can show an empty list of bookmarks', async t => {
await loginAsFoobar(t)
await t
.click(communityNavButton)
.click($('a').withText('Bookmarks'))
.expect(getUrl()).contains('bookmarks')
.expect(timeline.innerText).contains('Nothing to show.')
})
test('Can show an empty list of media', async t => {
await loginAsFoobar(t)
await t
.click($('a').withText('quux'))
.expect(getUrl()).contains('accounts/3')
.click($('a').withText('Media'))
.expect(getUrl()).contains('accounts/3/media')
.expect(timeline.innerText).contains('Nothing to show.')
})