add test for account profile statuses
This commit is contained in:
parent
5c45212159
commit
09504794c6
|
@ -52,3 +52,8 @@ export const favorites = [
|
|||
{content: 'notification of unlisted message'},
|
||||
{content: 'pinned toot 1'}
|
||||
]
|
||||
|
||||
export const quuxStatuses = [
|
||||
{content: 'pinned toot 2'},
|
||||
{content: 'pinned toot 1'}
|
||||
].concat(times(25, i => ({content: `unlisted thread ${25 - i}`})))
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { Selector as $ } from 'testcafe'
|
||||
import { getUrl } from '../utils'
|
||||
import { getUrl, validateTimeline } from '../utils'
|
||||
import { foobarRole } from '../roles'
|
||||
import { quuxStatuses } from '../fixtures'
|
||||
|
||||
fixture`07-account-profile.js`
|
||||
.page`http://localhost:4002`
|
||||
|
@ -37,3 +38,14 @@ test('shows account profile 3', async t => {
|
|||
.expect($('.account-profile .account-profile-followed-by').innerText).eql('')
|
||||
.expect($('.account-profile .account-profile-follow').innerText).eql('')
|
||||
})
|
||||
|
||||
test('shows account profile statuses', async t => {
|
||||
await t.useRole(foobarRole)
|
||||
.click($('.status-author-name').withText(('quux')))
|
||||
.expect(getUrl()).contains('/accounts/3')
|
||||
.expect($('.pinned-statuses .status-article').getAttribute('aria-setsize')).eql('2')
|
||||
.expect($('.pinned-statuses .status-article').getAttribute('aria-posinset')).eql('0')
|
||||
.expect($('.timeline .status-article').getAttribute('aria-posinset')).eql('0')
|
||||
await validateTimeline(t, quuxStatuses)
|
||||
await t.expect($('.timeline .status-article').getAttribute('aria-setsize')).eql('27')
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue