diff options
author | Kevin Serrano <kevin.serrano@consensys.net> | 2017-09-21 00:40:33 +0800 |
---|---|---|
committer | Kevin Serrano <kevin.serrano@consensys.net> | 2017-09-21 00:40:33 +0800 |
commit | b22783a223e84e541db9c1e2d411ef27f62d7e62 (patch) | |
tree | 6ad0809ed79a0e1aa7e5934616779168324ec143 /test/integration/lib | |
parent | bd8428e9ed3e1fb386620def0739720aa8985299 (diff) | |
parent | 9bd55f4897938bfdc363987252be6f5f390ab7a5 (diff) | |
download | tangerine-wallet-browser-b22783a223e84e541db9c1e2d411ef27f62d7e62.tar tangerine-wallet-browser-b22783a223e84e541db9c1e2d411ef27f62d7e62.tar.gz tangerine-wallet-browser-b22783a223e84e541db9c1e2d411ef27f62d7e62.tar.bz2 tangerine-wallet-browser-b22783a223e84e541db9c1e2d411ef27f62d7e62.tar.lz tangerine-wallet-browser-b22783a223e84e541db9c1e2d411ef27f62d7e62.tar.xz tangerine-wallet-browser-b22783a223e84e541db9c1e2d411ef27f62d7e62.tar.zst tangerine-wallet-browser-b22783a223e84e541db9c1e2d411ef27f62d7e62.zip |
Merge branch 'master' into new-currency-test
Diffstat (limited to 'test/integration/lib')
-rw-r--r-- | test/integration/lib/first-time.js | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/test/integration/lib/first-time.js b/test/integration/lib/first-time.js index 38a94e551..cedb14f6e 100644 --- a/test/integration/lib/first-time.js +++ b/test/integration/lib/first-time.js @@ -10,19 +10,12 @@ QUnit.test('render init screen', (assert) => { }) }) -// QUnit.testDone(({ module, name, total, passed, failed, skipped, todo, runtime }) => { -// if (failed > 0) { -// const app = $('iframe').contents()[0].documentElement -// console.warn('Test failures - dumping DOM:') -// console.log(app.innerHTML) -// } -// }) - async function runFirstTimeUsageTest(assert, done) { + let waitTime = 0 + if (window.METAMASK_PLATFORM_TYPE === 'mascara') waitTime = 4000 + await timeout(waitTime) - await timeout() - - const app = $('#app-content .mock-app-root') + const app = $('#app-content') // recurse notices while (true) { @@ -32,10 +25,12 @@ async function runFirstTimeUsageTest(assert, done) { const termsPage = app.find('.markdown')[0] termsPage.scrollTop = termsPage.scrollHeight await timeout() + console.log('Clearing notice') button.click() await timeout() } else { // exit loop + console.log('No more notices...') break } } @@ -58,7 +53,7 @@ async function runFirstTimeUsageTest(assert, done) { const createButton = app.find('button.primary')[0] createButton.click() - await timeout(1500) + await timeout(3000) const created = app.find('h3')[0] assert.equal(created.textContent, 'Vault Created', 'Vault created screen') @@ -129,10 +124,8 @@ async function runFirstTimeUsageTest(assert, done) { assert.ok(children2, 'All network options present') } -function timeout(time) { - return new Promise(function (resolve, reject) { - setTimeout(function () { - resolve() - }, time * 3 || 1500) +function timeout (time) { + return new Promise((resolve, reject) => { + setTimeout(resolve, time || 1500) }) }
\ No newline at end of file |