From acc973d543ac65f8db980c0007c248c509345411 Mon Sep 17 00:00:00 2001 From: Dan Date: Thu, 2 Nov 2017 17:15:45 -0230 Subject: Update classnames for integration tests and add output/index.css to integration test for ci --- test/integration/lib/mascara-first-time.js | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) (limited to 'test/integration/lib/mascara-first-time.js') diff --git a/test/integration/lib/mascara-first-time.js b/test/integration/lib/mascara-first-time.js index 3398a5511..398ecea0e 100644 --- a/test/integration/lib/mascara-first-time.js +++ b/test/integration/lib/mascara-first-time.js @@ -102,14 +102,12 @@ async function runFirstTimeUsageTest (assert, done) { app.find('.buy-ether__do-it-later').click() await timeout(1000) - const sandwich = app.find('.sandwich-expando')[0] - sandwich.click() + const menu = app.find('.account-menu__icon')[0] + menu.click() await timeout() - const menu = app.find('.menu-droppo')[0] - const children = menu.children - const lock = children[children.length - 2] + const lock = app.find('.account-menu__logout-button')[0] assert.ok(lock, 'Lock menu item found') lock.click() @@ -123,31 +121,25 @@ async function runFirstTimeUsageTest (assert, done) { await timeout(1000) - const detail2 = app.find('.account-detail-section')[0] + const detail2 = app.find('.wallet-view')[0] assert.ok(detail2, 'Account detail section loaded again.') await timeout() // open account settings dropdown - const qrButton = app.find('.fa.fa-ellipsis-h')[0] + const qrButton = app.find('.wallet-view__details-button')[0] qrButton.click() await timeout(1000) - // qr code item - const qrButton2 = app.find('.dropdown-menu-item')[1] - qrButton2.click() - - await timeout(1000) - - const qrHeader = app.find('.qr-header')[0] - const qrContainer = app.find('#qr-container')[0] + const qrHeader = app.find('.editable-label__value')[0] + const qrContainer = app.find('.qr-wrapper')[0] assert.equal(qrHeader.textContent, 'Account 1', 'Should show account label.') assert.ok(qrContainer, 'QR Container found') await timeout() - const networkMenu = app.find('.network-indicator')[0] + const networkMenu = app.find('.network-component')[0] networkMenu.click() await timeout() @@ -164,4 +156,4 @@ function timeout (time) { return new Promise((resolve, reject) => { setTimeout(resolve, time || 1500) }) -} +} \ No newline at end of file -- cgit From ec6c3c33bdbe2d90dc71649d0cc5fb3c07d96af7 Mon Sep 17 00:00:00 2001 From: Dan Date: Tue, 5 Dec 2017 13:11:59 -0330 Subject: Merge branch 'master' into NewUI-flat-merge-with-master --- test/integration/lib/mascara-first-time.js | 59 ++++++++++++------------------ 1 file changed, 24 insertions(+), 35 deletions(-) (limited to 'test/integration/lib/mascara-first-time.js') diff --git a/test/integration/lib/mascara-first-time.js b/test/integration/lib/mascara-first-time.js index 398ecea0e..515c7f383 100644 --- a/test/integration/lib/mascara-first-time.js +++ b/test/integration/lib/mascara-first-time.js @@ -6,23 +6,7 @@ async function runFirstTimeUsageTest (assert, done) { const app = $('#app-content') - // recurse notices - while (true) { - const button = app.find('button') - if (button.html() === 'Accept') { - // still notices to accept - 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 - } - } + await skipNotices(app) await timeout() @@ -51,28 +35,13 @@ async function runFirstTimeUsageTest (assert, done) { assert.equal(created.textContent, 'Your unique account image', 'unique image screen') // Agree button - const button = app.find('button')[0] + let button = app.find('button')[0] assert.ok(button, 'button present') button.click() await timeout(1000) - // Privacy Screen - const detail = app.find('.tou__title')[0] - assert.equal(detail.textContent, 'Privacy Notice', 'privacy notice screen') - app.find('button').click() - - await timeout(1000) - - - // terms of service screen - const tou = app.find('.tou__title')[0] - assert.equal(tou.textContent, 'Terms of Use', 'terms of use screen') - app.find('.tou__body').scrollTop(100000) - await timeout(1000) - - app.find('.first-time-flow__button').click() - await timeout(1000) + await skipNotices(app) // secret backup phrase const seedTitle = app.find('.backup-phrase__title')[0] @@ -156,4 +125,24 @@ function timeout (time) { return new Promise((resolve, reject) => { setTimeout(resolve, time || 1500) }) -} \ No newline at end of file +} + +async function skipNotices (app) { + while (true) { + const button = app.find('button') + if (button && button.html() === 'Accept') { + // still notices to accept + const termsPage = app.find('.markdown')[0] + if (!termsPage) { + break + } + termsPage.scrollTop = termsPage.scrollHeight + await timeout() + button.click() + await timeout() + } else { + console.log('No more notices...') + break + } + } +} -- cgit