From 44616483e032241a63c49abec752aa8ef16551d2 Mon Sep 17 00:00:00 2001 From: kumavis Date: Thu, 3 Aug 2017 21:40:32 -0700 Subject: test - integration - throw error on failure --- test/integration/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/integration') diff --git a/test/integration/index.js b/test/integration/index.js index 85f91d92b..e9263c6c8 100644 --- a/test/integration/index.js +++ b/test/integration/index.js @@ -17,7 +17,7 @@ try { }) b.bundle().pipe(writeStream) -} catch (e) { - console.error('Integration build failure', e) +} catch (err) { + throw new Error('Integration tests build failure - ' + err.stack) } -- cgit From 925edd5f7decfc3272b6ad5bf9b44ca8504fd0c8 Mon Sep 17 00:00:00 2001 From: kumavis Date: Thu, 3 Aug 2017 21:50:17 -0700 Subject: test - integration - remove unused code --- test/integration/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test/integration') diff --git a/test/integration/index.js b/test/integration/index.js index e9263c6c8..549b7d37c 100644 --- a/test/integration/index.js +++ b/test/integration/index.js @@ -8,7 +8,9 @@ var b = browserify() // Remove old bundle try { - fs.unlinkSync(bundlePath) + // if (fs.existsSync(bundlePath)) { + // fs.unlinkSync(bundlePath) + // } var writeStream = fs.createWriteStream(bundlePath) -- cgit From f804567d24cd3e0bd6d8dd77f637da79207c5e08 Mon Sep 17 00:00:00 2001 From: kumavis Date: Thu, 3 Aug 2017 21:50:41 -0700 Subject: test - integration - syntax - prefer const --- test/integration/index.js | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'test/integration') diff --git a/test/integration/index.js b/test/integration/index.js index 549b7d37c..ab418a146 100644 --- a/test/integration/index.js +++ b/test/integration/index.js @@ -1,18 +1,13 @@ -var fs = require('fs') -var path = require('path') -var browserify = require('browserify') -var tests = fs.readdirSync(path.join(__dirname, 'lib')) -var bundlePath = path.join(__dirname, 'bundle.js') +const fs = require('fs') +const path = require('path') +const browserify = require('browserify') +const tests = fs.readdirSync(path.join(__dirname, 'lib')) +const bundlePath = path.join(__dirname, 'bundle.js') -var b = browserify() +const b = browserify() -// Remove old bundle try { - // if (fs.existsSync(bundlePath)) { - // fs.unlinkSync(bundlePath) - // } - - var writeStream = fs.createWriteStream(bundlePath) + const writeStream = fs.createWriteStream(bundlePath) tests.forEach(function (fileName) { b.add(path.join(__dirname, 'lib', fileName)) -- cgit From 0a5a46b8f40d6f52a96f0fee96f271dd66a506ab Mon Sep 17 00:00:00 2001 From: kumavis Date: Thu, 3 Aug 2017 22:24:22 -0700 Subject: test - integration - better error handling --- test/integration/index.js | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'test/integration') diff --git a/test/integration/index.js b/test/integration/index.js index ab418a146..e089fc39b 100644 --- a/test/integration/index.js +++ b/test/integration/index.js @@ -6,15 +6,14 @@ const bundlePath = path.join(__dirname, 'bundle.js') const b = browserify() -try { - const writeStream = fs.createWriteStream(bundlePath) +const writeStream = fs.createWriteStream(bundlePath) - tests.forEach(function (fileName) { - b.add(path.join(__dirname, 'lib', fileName)) - }) - - b.bundle().pipe(writeStream) -} catch (err) { - throw new Error('Integration tests build failure - ' + err.stack) -} +tests.forEach(function (fileName) { + b.add(path.join(__dirname, 'lib', fileName)) +}) +b.bundle() +.pipe(writeStream) +.on('error', (err) => { + throw err +}) -- cgit From f37f405d5273ce6387132e4e9887d6b578b74fea Mon Sep 17 00:00:00 2001 From: sdtsui Date: Fri, 4 Aug 2017 23:34:54 -0700 Subject: Fix integration test failures: ensure qr code is accessible --- test/integration/lib/first-time.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'test/integration') diff --git a/test/integration/lib/first-time.js b/test/integration/lib/first-time.js index 6c8cedbac..0e4b802da 100644 --- a/test/integration/lib/first-time.js +++ b/test/integration/lib/first-time.js @@ -90,7 +90,13 @@ QUnit.test('render init screen', function (assert) { return wait() }).then(function (){ - var qrButton = app.find('.fa.fa-qrcode')[0] + var qrButton = app.find('.fa.fa-ellipsis-h')[0] // open account settings dropdown + qrButton.click() + + return wait(1000) + }).then(function (){ + + var qrButton = app.find('.dropdown-menu-item')[1] // qr code item qrButton.click() return wait(1000) -- cgit