mirror of
https://github.com/nolanlawson/pinafore
synced 2024-12-15 03:44:02 +01:00
8dbc1b0503
* chore(package): update standard to version 12.0.0 * package lock update * fix eslint
41 lines
1.4 KiB
JavaScript
41 lines
1.4 KiB
JavaScript
import { loginAsFoobar } from '../roles'
|
|
import {
|
|
composeInput, getNthComposeReplyButton, getNthComposeReplyInput, getNthReplyButton, getNthStatus, getUrl,
|
|
homeNavButton, notificationsNavButton,
|
|
postStatusButton
|
|
} from '../utils'
|
|
|
|
fixture`103-compose.js`
|
|
.page`http://localhost:4002`
|
|
|
|
test('statuses show up in home timeline', async t => {
|
|
await loginAsFoobar(t)
|
|
await t
|
|
.typeText(composeInput, 'hello world', { paste: true })
|
|
.click(postStatusButton)
|
|
.expect(getNthStatus(0).innerText).contains('hello world')
|
|
.click(notificationsNavButton)
|
|
.expect(getUrl()).contains('/notifications')
|
|
.click(homeNavButton)
|
|
.expect(getUrl()).eql('http://localhost:4002/')
|
|
.expect(getNthStatus(0).innerText).contains('hello world')
|
|
.navigateTo('/')
|
|
.expect(getNthStatus(0).innerText).contains('hello world')
|
|
})
|
|
|
|
test('statuses in threads show up in right order', async t => {
|
|
await loginAsFoobar(t)
|
|
await t
|
|
.navigateTo('/accounts/5')
|
|
.click(getNthStatus(2))
|
|
.expect(getUrl()).contains('/statuses')
|
|
.click(getNthReplyButton(3))
|
|
.typeText(getNthComposeReplyInput(3), 'my reply!', { paste: true })
|
|
.click(getNthComposeReplyButton(3))
|
|
.expect(getNthComposeReplyInput(3).exists).notOk()
|
|
.expect(getNthStatus(5).innerText).contains('@baz my reply!')
|
|
.navigateTo('/accounts/5')
|
|
.click(getNthStatus(2))
|
|
.expect(getNthStatus(5).innerText).contains('@baz my reply!')
|
|
})
|