This commit is contained in:
Nolan Lawson 2018-03-08 18:09:35 -08:00
parent 4177de913d
commit f0d05b7560
4 changed files with 11 additions and 11 deletions

View file

@ -1,9 +1,9 @@
import times from 'lodash/times'
function unrollThread(user, prefix, privacy, thread) {
function unrollThread (user, prefix, privacy, thread) {
let res = []
function unroll(node, parentKey) {
function unroll (node, parentKey) {
if (!node) {
return
}
@ -284,7 +284,7 @@ export const actions = times(30, i => ({
}
}
].concat(unrollThread('baz', 'bazthread-', 'unlisted', {
'thread 1' : {
'thread 1': {
'thread 2': {
'thread 2a': null,
'thread 2b': {
@ -322,5 +322,5 @@ export const actions = times(30, i => ({
text: 'thread 2b2a',
inReplyTo: 'bazthread-thread 2b2'
}
},
}
]))

View file

@ -7,7 +7,7 @@ const notifyOffline = debounce(() => {
toast.say('You seem to be offline. You can still read toots while offline.')
}, OFFLINE_DELAY)
export function onlineObservers(store) {
export function onlineObservers (store) {
if (!process.browser) {
return
}
@ -30,4 +30,4 @@ export function onlineObservers(store) {
window.addEventListener('offline', () => store.set({online: false}))
window.addEventListener('online', () => store.set({online: true}))
}
}

View file

@ -85,5 +85,5 @@ export const bazThreadRelativeTo2 = [
{content: 'thread 2b1'},
{content: 'thread 2b2'},
{content: 'thread 2b2a'},
{content: 'thread 2c'},
]
{content: 'thread 2c'}
]

View file

@ -39,7 +39,7 @@ test('Scrolls to proper point in thread', async t => {
.eql(Math.round($('.container').boundingClientRect.top))
})
async function navigateToBazAccount(t) {
async function navigateToBazAccount (t) {
await t.click(searchNavButton)
.expect(getUrl()).contains('/search')
.typeText(searchInput, 'baz', {paste: true})
@ -48,7 +48,7 @@ async function navigateToBazAccount(t) {
.expect(getUrl()).contains('/accounts/5')
}
async function validateForkedThread(t) {
async function validateForkedThread (t) {
await t.hover(getNthStatus(1))
.click(getNthStatus(2))
.expect(getUrl()).contains('/statuses')
@ -79,4 +79,4 @@ test('Forked threads look correct online and offline', async t => {
await forceOffline()
await validateForkedThread(t)
await forceOnline()
})
})