diff options
Diffstat (limited to 'test/e2e')
-rw-r--r-- | test/e2e/beta/metamask-beta-ui.spec.js | 16 | ||||
-rw-r--r-- | test/e2e/metamask.spec.js | 24 |
2 files changed, 27 insertions, 13 deletions
diff --git a/test/e2e/beta/metamask-beta-ui.spec.js b/test/e2e/beta/metamask-beta-ui.spec.js index ceeea31a5..0d304cf14 100644 --- a/test/e2e/beta/metamask-beta-ui.spec.js +++ b/test/e2e/beta/metamask-beta-ui.spec.js @@ -129,19 +129,25 @@ describe('MetaMask', function () { }) it('clicks through the privacy notice', async () => { - const nextScreen = await findElement(driver, By.css('.tou button')) - await nextScreen.click() - await delay(regularDelayMs) - + // terms of use const canClickThrough = await driver.findElement(By.css('.tou 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')) await acceptTos.click() await delay(regularDelayMs) + + // privacy notice + const nextScreen = await findElement(driver, By.css('.tou button')) + await nextScreen.click() + await delay(regularDelayMs) + + // phishing notice + const nextScreen = await findElement(driver, By.css('.tou button')) + await nextScreen.click() + await delay(regularDelayMs) }) let seedPhrase diff --git a/test/e2e/metamask.spec.js b/test/e2e/metamask.spec.js index a08a34d96..fb7e083c3 100644 --- a/test/e2e/metamask.spec.js +++ b/test/e2e/metamask.spec.js @@ -73,14 +73,6 @@ describe('Metamask popup page', function () { assert.equal(title, 'MetaMask', 'title matches MetaMask') }) - it('shows privacy notice', async () => { - await delay(300) - const privacy = await driver.findElement(By.css('.terms-header')).getText() - assert.equal(privacy, 'PRIVACY NOTICE', 'shows privacy notice') - await driver.findElement(By.css('button')).click() - await delay(300) - }) - it('show terms of use', async () => { const terms = await driver.findElement(By.css('.terms-header')).getText() assert.equal(terms, 'TERMS OF USE', 'shows terms of use') @@ -100,6 +92,22 @@ describe('Metamask popup page', function () { await button.click() }) + it('shows privacy notice', async () => { + await delay(300) + const privacy = await driver.findElement(By.css('.terms-header')).getText() + assert.equal(privacy, 'PRIVACY NOTICE', 'shows privacy notice') + await driver.findElement(By.css('button')).click() + await delay(300) + }) + + it('shows phishing notice', async () => { + await delay(300) + const noticeHeader = await driver.findElement(By.css('.terms-header')).getText() + assert.equal(noticeHeader, 'PHISHING WARNING', 'shows phishing warning') + await driver.findElement(By.css('button')).click() + await delay(300) + }) + it('accepts password with length of eight', async () => { const passwordBox = await driver.findElement(By.id('password-box')) const passwordBoxConfirm = await driver.findElement(By.id('password-box-confirm')) |