aboutsummaryrefslogtreecommitdiffstats
path: root/test/integration/lib/first-time.js
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2017-09-20 02:27:49 +0800
committerkumavis <aaron@kumavis.me>2017-09-20 02:27:49 +0800
commit77e02d264ad65cacd6a3c4f0087bd5e2c375ef4c (patch)
treed11ce4e1e314a9fe5018737eae17b68316b60a13 /test/integration/lib/first-time.js
parentb979c6a2f3856525faaff0de94a3e97e322d18b6 (diff)
parent166bd55a43125796521f7caf97c2e2baf3519b36 (diff)
downloadtangerine-wallet-browser-77e02d264ad65cacd6a3c4f0087bd5e2c375ef4c.tar
tangerine-wallet-browser-77e02d264ad65cacd6a3c4f0087bd5e2c375ef4c.tar.gz
tangerine-wallet-browser-77e02d264ad65cacd6a3c4f0087bd5e2c375ef4c.tar.bz2
tangerine-wallet-browser-77e02d264ad65cacd6a3c4f0087bd5e2c375ef4c.tar.lz
tangerine-wallet-browser-77e02d264ad65cacd6a3c4f0087bd5e2c375ef4c.tar.xz
tangerine-wallet-browser-77e02d264ad65cacd6a3c4f0087bd5e2c375ef4c.tar.zst
tangerine-wallet-browser-77e02d264ad65cacd6a3c4f0087bd5e2c375ef4c.zip
Merge branch 'master' of github.com:MetaMask/metamask-plugin into json-rpc-engine-bump
Diffstat (limited to 'test/integration/lib/first-time.js')
-rw-r--r--test/integration/lib/first-time.js27
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