travis: try to fix flaky tests
This commit is contained in:
parent
7488eaebd6
commit
dac4d120f3
|
@ -68,3 +68,5 @@ branches:
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- $HOME/.npm
|
- $HOME/.npm
|
||||||
|
- $HOME/.rvm
|
||||||
|
- $HOME/.bundle
|
|
@ -45,6 +45,7 @@ export async function restoreMastodonData () {
|
||||||
let internalIdsToIds = {}
|
let internalIdsToIds = {}
|
||||||
for (let action of actions) {
|
for (let action of actions) {
|
||||||
console.log(JSON.stringify(action))
|
console.log(JSON.stringify(action))
|
||||||
|
await new Promise(resolve => setTimeout(resolve, 100)) // sleep because otherwise order may not be preserved
|
||||||
let accessToken = users[action.user].accessToken
|
let accessToken = users[action.user].accessToken
|
||||||
|
|
||||||
if (action.post) {
|
if (action.post) {
|
||||||
|
|
|
@ -48,15 +48,15 @@ export const sleep = timeout => new Promise(resolve => setTimeout(resolve, timeo
|
||||||
export const getUrl = exec(() => window.location.href)
|
export const getUrl = exec(() => window.location.href)
|
||||||
|
|
||||||
export const getActiveElementClass = exec(() =>
|
export const getActiveElementClass = exec(() =>
|
||||||
document.activeElement ? document.activeElement.getAttribute('class') : ''
|
(document.activeElement && document.activeElement.getAttribute('class')) || ''
|
||||||
)
|
)
|
||||||
|
|
||||||
export const getActiveElementInnerText = exec(() =>
|
export const getActiveElementInnerText = exec(() =>
|
||||||
document.activeElement && document.activeElement.innerText
|
(document.activeElement && document.activeElement.innerText) || ''
|
||||||
)
|
)
|
||||||
|
|
||||||
export const getActiveElementAriaLabel = exec(() =>
|
export const getActiveElementAriaLabel = exec(() =>
|
||||||
document.activeElement ? document.activeElement.getAttribute('aria-label') : ''
|
(document.activeElement && document.activeElement.getAttribute('aria-label')) || ''
|
||||||
)
|
)
|
||||||
|
|
||||||
export const getActiveElementInsideNthStatus = exec(() => {
|
export const getActiveElementInsideNthStatus = exec(() => {
|
||||||
|
@ -67,6 +67,7 @@ export const getActiveElementInsideNthStatus = exec(() => {
|
||||||
}
|
}
|
||||||
element = element.parentElement
|
element = element.parentElement
|
||||||
}
|
}
|
||||||
|
return ''
|
||||||
})
|
})
|
||||||
|
|
||||||
export const goBack = exec(() => window.history.back())
|
export const goBack = exec(() => window.history.back())
|
||||||
|
|
Loading…
Reference in a new issue