fix some tests
This commit is contained in:
parent
9c6b8a7a8e
commit
a5ca99c2f0
|
@ -23,7 +23,8 @@
|
||||||
<StatusContent status="{{originalStatus}}" :isStatusInOwnThread :isStatusInNotification />
|
<StatusContent status="{{originalStatus}}" :isStatusInOwnThread :isStatusInNotification />
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if originalStatus.media_attachments && originalStatus.media_attachments.length}}
|
{{#if originalStatus.media_attachments && originalStatus.media_attachments.length}}
|
||||||
<StatusMediaAttachments status="{{originalStatus}}" :timelineType :timelineValue />
|
<StatusMediaAttachments status="{{originalStatus}}" :timelineType :timelineValue
|
||||||
|
on:recalculateHeight :contextualStatusId />
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if isStatusInOwnThread}}
|
{{#if isStatusInOwnThread}}
|
||||||
<StatusDetails status="{{originalStatus}}" />
|
<StatusDetails status="{{originalStatus}}" />
|
||||||
|
|
|
@ -2,7 +2,7 @@ import { ClientFunction as exec, Selector as $ } from 'testcafe'
|
||||||
import * as images from './images'
|
import * as images from './images'
|
||||||
import * as blobUtils from './blobUtils'
|
import * as blobUtils from './blobUtils'
|
||||||
|
|
||||||
const SCROLL_INTERVAL = 2
|
const SCROLL_INTERVAL = 1
|
||||||
|
|
||||||
export const settingsButton = $('nav a[aria-label=Settings]')
|
export const settingsButton = $('nav a[aria-label=Settings]')
|
||||||
export const instanceInput = $('#instanceInput')
|
export const instanceInput = $('#instanceInput')
|
||||||
|
@ -185,8 +185,13 @@ export async function scrollToBottomOfTimeline (t) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function scrollToStatus (t, n) {
|
export async function scrollToStatus (t, n) {
|
||||||
for (let i = 0; i < n; i += 2) {
|
for (let i = 0; i <= n; i += SCROLL_INTERVAL) {
|
||||||
await t.hover(getNthStatus(n))
|
await t.hover(getNthStatus(i))
|
||||||
|
.expect($('.loading-footer').exist).notOk()
|
||||||
|
if (i < n) {
|
||||||
|
await t.hover(getNthStatus(i).find('.status-toolbar'))
|
||||||
|
.expect($('.loading-footer').exist).notOk()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
await t.hover(getNthStatus(n))
|
await t.hover(getNthStatus(n))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue