1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

tests - integration - mascara - small cleanup and timeout adjustments

This commit is contained in:
kumavis 2017-09-15 12:19:52 -07:00
parent c5a2527c17
commit 779e973b45
2 changed files with 5 additions and 9 deletions

View File

@ -63,9 +63,7 @@ function windowReload() {
} }
function timeout (time) { function timeout (time) {
return new Promise(function (resolve, reject) { return new Promise((resolve) => {
setTimeout(function () { setTimeout(resolve, time || 1500)
resolve()
}, time || 1500)
}) })
} }

View File

@ -13,7 +13,7 @@ QUnit.test('render init screen', (assert) => {
async function runFirstTimeUsageTest(assert, done) { async function runFirstTimeUsageTest(assert, done) {
let waitTime = 0 let waitTime = 0
window.METAMASK_SKIP_RELOAD = true window.METAMASK_SKIP_RELOAD = true
if (window.METAMASK_PLATFORM_TYPE === 'mascara') waitTime = 1000 if (window.METAMASK_PLATFORM_TYPE === 'mascara') waitTime = 2000
await timeout(waitTime) await timeout(waitTime)
const app = $('#app-content') const app = $('#app-content')
@ -126,9 +126,7 @@ async function runFirstTimeUsageTest(assert, done) {
} }
function timeout (time) { function timeout (time) {
return new Promise(function (resolve, reject) { return new Promise((resolve, reject) => {
setTimeout(function () { setTimeout(resolve, time || 1500)
resolve()
}, time * 3 || 1500)
}) })
} }