aboutsummaryrefslogtreecommitdiffstats
path: root/test/e2e/beta/metamask-beta-ui.spec.js
diff options
context:
space:
mode:
authorDan J Miller <danjm.com@gmail.com>2019-02-27 22:46:41 +0800
committerWhymarrh Whitby <whymarrh.whitby@gmail.com>2019-02-27 22:46:41 +0800
commitcb2698d20eae273d372d03e11fa765a91c330c17 (patch)
treef23b852b074dad770bfd970799220b63c40459b7 /test/e2e/beta/metamask-beta-ui.spec.js
parenta2320c76fef084b7ec01839ab9c17b474839b3c0 (diff)
downloadtangerine-wallet-browser-cb2698d20eae273d372d03e11fa765a91c330c17.tar.gz
tangerine-wallet-browser-cb2698d20eae273d372d03e11fa765a91c330c17.tar.zst
tangerine-wallet-browser-cb2698d20eae273d372d03e11fa765a91c330c17.zip
First time flow updates (#6192)
* Action select step of onboarding flow added. * Update navigation on create and import password screens. * Adds terms of service checkbox to create and import account screens. * Add security warning to jazzicon intro step * Update and streamline unique image to confirm seed steps of first time flow. * UI touch ups to welcome screen. * UI touch up on select action page * Fix first time import flow. * Add end of flow screen to first time flow * Replace unique image screen with updated fishing warning screen. * Update e2e tests for onboarding flow changes. * Add required translations to onboarding flow. * Update design of select action screen to emphasize create new wallet option. * Clean up onboarding flow code. * Remove notice related code from first-time-flow directory. * Use updater function argument in new-account.component
Diffstat (limited to 'test/e2e/beta/metamask-beta-ui.spec.js')
-rw-r--r--test/e2e/beta/metamask-beta-ui.spec.js56
1 files changed, 17 insertions, 39 deletions
diff --git a/test/e2e/beta/metamask-beta-ui.spec.js b/test/e2e/beta/metamask-beta-ui.spec.js
index 798cce372..26aa50a43 100644
--- a/test/e2e/beta/metamask-beta-ui.spec.js
+++ b/test/e2e/beta/metamask-beta-ui.spec.js
@@ -102,11 +102,18 @@ describe('MetaMask', function () {
describe('Going through the first time flow', () => {
it('clicks the continue button on the welcome screen', async () => {
- const welcomeScreenBtn = await findElement(driver, By.css('.welcome-page .first-time-flow__button'))
+ await findElement(driver, By.css('.welcome-page__header'))
+ const welcomeScreenBtn = await findElement(driver, By.css('.first-time-flow__button'))
welcomeScreenBtn.click()
await delay(largeDelayMs)
})
+ it('clicks the "Create New Wallet" option', async () => {
+ const customRpcButton = await findElement(driver, By.xpath(`//button[contains(text(), 'Create a Wallet')]`))
+ customRpcButton.click()
+ await delay(largeDelayMs)
+ })
+
it('accepts a secure password', async () => {
const passwordBox = await findElement(driver, By.css('.first-time-flow__form #create-password'))
const passwordBoxConfirm = await findElement(driver, By.css('.first-time-flow__form #confirm-password'))
@@ -114,43 +121,16 @@ describe('MetaMask', function () {
await passwordBox.sendKeys('correct horse battery staple')
await passwordBoxConfirm.sendKeys('correct horse battery staple')
- await button.click()
- await delay(regularDelayMs)
- })
-
- it('clicks through the unique image screen', async () => {
- await findElement(driver, By.css('.first-time-flow__unique-image'))
- const nextScreen = await findElement(driver, By.css('button.first-time-flow__button'))
- await nextScreen.click()
- await delay(regularDelayMs)
- })
- it('clicks through the ToS', async () => {
- // terms of use
- 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('button.first-time-flow__button'))
- driver.wait(until.elementIsEnabled(acceptTos))
- await acceptTos.click()
- await delay(regularDelayMs)
- })
+ const tosCheckBox = await findElement(driver, By.css('.first-time-flow__checkbox'))
+ await tosCheckBox.click()
- it('clicks through the privacy notice', async () => {
- // privacy notice
- const nextScreen = await findElement(driver, By.css('button.first-time-flow__button'))
- await nextScreen.click()
+ await button.click()
await delay(regularDelayMs)
})
- it('clicks through the phishing notice', async () => {
- // phishing notice
- const noticeElement = await driver.findElement(By.css('.first-time-flow__markdown'))
- await driver.executeScript('arguments[0].scrollTop = arguments[0].scrollHeight', noticeElement)
- await delay(regularDelayMs)
+ it('clicks through the security warning screen', async () => {
+ await findElement(driver, By.xpath(`//div[contains(text(), 'Protect Your Keys!')]`))
const nextScreen = await findElement(driver, By.css('button.first-time-flow__button'))
await nextScreen.click()
await delay(regularDelayMs)
@@ -219,12 +199,10 @@ describe('MetaMask', function () {
await delay(regularDelayMs)
})
- it('clicks through the deposit modal', async () => {
- const byBuyModal = By.css('span .modal')
- const buyModal = await driver.wait(until.elementLocated(byBuyModal))
- const closeModal = await findElement(driver, By.css('.page-container__header-close'))
- await closeModal.click()
- await driver.wait(until.stalenessOf(buyModal))
+ it('clicks through the success screen', async () => {
+ await findElement(driver, By.xpath(`//div[contains(text(), 'Congratulations')]`))
+ const doneButton = await findElement(driver, By.css('button.first-time-flow__button'))
+ await doneButton.click()
await delay(regularDelayMs)
})
})