diff options
author | Alexander Tseung <alextsg@users.noreply.github.com> | 2019-01-23 23:25:34 +0800 |
---|---|---|
committer | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2019-01-23 23:25:34 +0800 |
commit | fba17d77de9e60de0e02e90dc6dbcbbf7454158a (patch) | |
tree | 0a14f465c25b2b400f5706b55993dcf06d6633a3 /test/e2e/beta/from-import-beta-ui.spec.js | |
parent | 69fcfa427bdee2ea287e9d9c23963dc1032685cd (diff) | |
download | tangerine-wallet-browser-fba17d77de9e60de0e02e90dc6dbcbbf7454158a.tar tangerine-wallet-browser-fba17d77de9e60de0e02e90dc6dbcbbf7454158a.tar.gz tangerine-wallet-browser-fba17d77de9e60de0e02e90dc6dbcbbf7454158a.tar.bz2 tangerine-wallet-browser-fba17d77de9e60de0e02e90dc6dbcbbf7454158a.tar.lz tangerine-wallet-browser-fba17d77de9e60de0e02e90dc6dbcbbf7454158a.tar.xz tangerine-wallet-browser-fba17d77de9e60de0e02e90dc6dbcbbf7454158a.tar.zst tangerine-wallet-browser-fba17d77de9e60de0e02e90dc6dbcbbf7454158a.zip |
Refactor first time flow, remove seed phrase from state (#5994)
* Refactor and fix styling for first time flow. Remove seed phrase from persisted metamask state
* Fix linting and tests
* Fix translations, initialization notice routing
* Fix drizzle tests
* Fix e2e tests
* Fix integration tests
* Fix styling
* Fix migration naming from 030 to 031
* Open extension in browser when user has not completed onboarding
Diffstat (limited to 'test/e2e/beta/from-import-beta-ui.spec.js')
-rw-r--r-- | test/e2e/beta/from-import-beta-ui.spec.js | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/test/e2e/beta/from-import-beta-ui.spec.js b/test/e2e/beta/from-import-beta-ui.spec.js index aa951a243..d4a380584 100644 --- a/test/e2e/beta/from-import-beta-ui.spec.js +++ b/test/e2e/beta/from-import-beta-ui.spec.js @@ -95,7 +95,7 @@ describe('Using MetaMask with an existing account', function () { describe('First time flow starting from an existing seed phrase', () => { it('clicks the continue button on the welcome screen', async () => { - const welcomeScreenBtn = await findElement(driver, By.css('.welcome-screen__button')) + const welcomeScreenBtn = await findElement(driver, By.css('.welcome-page .first-time-flow__button')) welcomeScreenBtn.click() await delay(largeDelayMs) }) @@ -105,7 +105,7 @@ describe('Using MetaMask with an existing account', function () { await seedPhrase.click() await delay(regularDelayMs) - const [seedTextArea] = await findElements(driver, By.css('textarea.import-account__secret-phrase')) + const [seedTextArea] = await findElements(driver, By.css('textarea.first-time-flow__textarea')) await seedTextArea.sendKeys(testSeedPhrase) await delay(regularDelayMs) @@ -121,30 +121,31 @@ describe('Using MetaMask with an existing account', function () { it('clicks through the ToS', async () => { // terms of use - await delay(largeDelayMs) - const canClickThrough = await driver.findElement(By.css('.tou button')).isEnabled() + await findElement(driver, By.css('.first-time-flow__markdown')) + const canClickThrough = await driver.findElement(By.css('button.first-time-flow__button')).isEnabled() assert.equal(canClickThrough, false, 'disabled continue button') const bottomOfTos = await findElement(driver, By.linkText('Attributions')) await driver.executeScript('arguments[0].scrollIntoView(true)', bottomOfTos) await delay(regularDelayMs) - const acceptTos = await findElement(driver, By.css('.tou button')) + const acceptTos = await findElement(driver, By.css('button.first-time-flow__button')) + driver.wait(until.elementIsEnabled(acceptTos)) await acceptTos.click() await delay(regularDelayMs) }) it('clicks through the privacy notice', async () => { // privacy notice - const nextScreen = await findElement(driver, By.css('.tou button')) + const nextScreen = await findElement(driver, By.css('button.first-time-flow__button')) await nextScreen.click() await delay(regularDelayMs) }) it('clicks through the phishing notice', async () => { // phishing notice - const noticeElement = await driver.findElement(By.css('.markdown')) + const noticeElement = await driver.findElement(By.css('.first-time-flow__markdown')) await driver.executeScript('arguments[0].scrollTop = arguments[0].scrollHeight', noticeElement) await delay(regularDelayMs) - const nextScreen = await findElement(driver, By.css('.tou button')) + const nextScreen = await findElement(driver, By.css('button.first-time-flow__button')) await nextScreen.click() await delay(regularDelayMs) }) |