From a30b5ccd951e9a7b90cf7cd3a22c72cca1520275 Mon Sep 17 00:00:00 2001 From: Dan Date: Mon, 26 Mar 2018 06:06:28 -0230 Subject: Update add token integration tests. --- test/integration/lib/add-token.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'test/integration/lib') diff --git a/test/integration/lib/add-token.js b/test/integration/lib/add-token.js index 42ed28dca..5567de0d0 100644 --- a/test/integration/lib/add-token.js +++ b/test/integration/lib/add-token.js @@ -34,11 +34,11 @@ async function runAddTokenFlowTest (assert, done) { let addTokenWrapper = await queryAsync($, '.add-token__wrapper') assert.ok(addTokenWrapper[0], 'add token wrapper renders') - let addTokenTitle = await queryAsync($, '.add-token__title') - assert.equal(addTokenTitle[0].textContent, 'Add Token', 'add token title is correct') + let addTokenTitle = await queryAsync($, '.add-token__header__title') + assert.equal(addTokenTitle[0].textContent, 'Add Tokens', 'add token title is correct') // Cancel Add Token - const cancelAddTokenButton = await queryAsync($, 'button.btn-cancel.add-token__button') + const cancelAddTokenButton = await queryAsync($, 'button.btn-cancel.add-token__button--cancel') assert.ok(cancelAddTokenButton[0], 'cancel add token button present') cancelAddTokenButton.click() @@ -51,9 +51,9 @@ async function runAddTokenFlowTest (assert, done) { // Verify Add Token Screen addTokenWrapper = await queryAsync($, '.add-token__wrapper') - addTokenTitle = await queryAsync($, '.add-token__title') + addTokenTitle = await queryAsync($, '.add-token__header__title') assert.ok(addTokenWrapper[0], 'add token wrapper renders') - assert.equal(addTokenTitle[0].textContent, 'Add Token', 'add token title is correct') + assert.equal(addTokenTitle[0].textContent, 'Add Tokens', 'add token title is correct') // Search for token const searchInput = await queryAsync($, 'input.add-token__input') @@ -91,9 +91,11 @@ async function runAddTokenFlowTest (assert, done) { assert.ok(addTokenButton[0], 'add token button present') addTokenButton[0].click() - const addCustom = await queryAsync($, '.add-token__add-custom') - assert.ok(addCustom[0], 'add custom token button present') - addCustom[0].click() + const addTokenTabs = await queryAsync($, '.add-token__header__tabs__tab') + assert.equal(addTokenTabs.length, 2, 'expected number of tabs') + assert.equal(addTokenTabs[1].textContent, 'Custom Token', 'Custom Token tab present') + assert.ok(addTokenTabs[1], 'add custom token tab present') + addTokenTabs[1].click() // Input token contract address const customInput = await queryAsync($, 'input.add-token__add-custom-input') @@ -108,7 +110,7 @@ async function runAddTokenFlowTest (assert, done) { // Verify symbol length error since contract address won't return symbol const errorMessage = await queryAsync($, '.add-token__add-custom-error-message') assert.ok(errorMessage[0], 'error rendered') - $('button.btn-cancel.add-token__button')[0].click() + $('button.btn-cancel.add-token__button--cancel')[0].click() // // Confirm Add token // assert.equal( -- cgit v1.2.3 From 07dd06424741c5a43de136496d44a6f9089e837b Mon Sep 17 00:00:00 2001 From: Dan Date: Mon, 26 Mar 2018 16:27:19 -0230 Subject: Fix tests. --- test/integration/lib/mascara-first-time.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/integration/lib') diff --git a/test/integration/lib/mascara-first-time.js b/test/integration/lib/mascara-first-time.js index bcbc94ff6..564852585 100644 --- a/test/integration/lib/mascara-first-time.js +++ b/test/integration/lib/mascara-first-time.js @@ -57,9 +57,9 @@ async function runFirstTimeUsageTest (assert, done) { ;(await findAsync(app, '.first-time-flow__button')).click() // Deposit Ether Screen - const buyEthTitle = (await findAsync(app, '.buy-ether__title'))[0] - assert.equal(buyEthTitle.textContent, 'Deposit Ether', 'deposit ether screen') - ;(await findAsync(app, '.buy-ether__do-it-later')).click() + const depositEthTitle = (await findAsync(app, '.page-container__title'))[0] + assert.equal(depositEthTitle.textContent, 'Deposit Ether', 'deposit ether screen') + ;(await findAsync(app, '.page-container__header-close')).click() const menu = (await findAsync(app, '.account-menu__icon'))[0] menu.click() -- cgit v1.2.3 From 15952816c17e4a0ac962c66a74abad0ab1013ef1 Mon Sep 17 00:00:00 2001 From: kumavis Date: Mon, 26 Mar 2018 13:58:04 -0700 Subject: test - remove timeout causing mocha disconnect issues Revert "test - flat - add extra timeout" This reverts commit 4c2cf15d2ad9cdfee4ce67b795877c7ab60231a7. --- test/integration/lib/send-new-ui.js | 1 - 1 file changed, 1 deletion(-) (limited to 'test/integration/lib') diff --git a/test/integration/lib/send-new-ui.js b/test/integration/lib/send-new-ui.js index 7bd9a7a65..163f3658c 100644 --- a/test/integration/lib/send-new-ui.js +++ b/test/integration/lib/send-new-ui.js @@ -129,7 +129,6 @@ async function runSendFlowTest(assert, done) { selectState.val('send edit') reactTriggerChange(selectState[0]) - await timeout(10000) const confirmFromName = (await queryAsync($, '.sender-to-recipient__sender-name')).first() assert.equal(confirmFromName[0].textContent, 'Send Account 2', 'confirm screen should show correct from name') -- cgit v1.2.3