diff --git a/.travis.yml b/.travis.yml index 3dd606a..4b7a216 100644 --- a/.travis.yml +++ b/.travis.yml @@ -68,3 +68,5 @@ branches: cache: directories: - $HOME/.npm + - $HOME/.rvm + - $HOME/.bundle \ No newline at end of file diff --git a/bin/restore-mastodon-data.js b/bin/restore-mastodon-data.js index 3383b9e..f38c39b 100644 --- a/bin/restore-mastodon-data.js +++ b/bin/restore-mastodon-data.js @@ -45,6 +45,7 @@ export async function restoreMastodonData () { let internalIdsToIds = {} for (let action of actions) { 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 if (action.post) { diff --git a/tests/utils.js b/tests/utils.js index d628bf0..af13310 100644 --- a/tests/utils.js +++ b/tests/utils.js @@ -48,15 +48,15 @@ export const sleep = timeout => new Promise(resolve => setTimeout(resolve, timeo export const getUrl = exec(() => window.location.href) export const getActiveElementClass = exec(() => - document.activeElement ? document.activeElement.getAttribute('class') : '' + (document.activeElement && document.activeElement.getAttribute('class')) || '' ) export const getActiveElementInnerText = exec(() => - document.activeElement && document.activeElement.innerText + (document.activeElement && document.activeElement.innerText) || '' ) export const getActiveElementAriaLabel = exec(() => - document.activeElement ? document.activeElement.getAttribute('aria-label') : '' + (document.activeElement && document.activeElement.getAttribute('aria-label')) || '' ) export const getActiveElementInsideNthStatus = exec(() => { @@ -67,6 +67,7 @@ export const getActiveElementInsideNthStatus = exec(() => { } element = element.parentElement } + return '' }) export const goBack = exec(() => window.history.back())