|
|
@ -42,12 +42,14 @@ describe('Metamask popup page', function () { |
|
|
|
driver.findElement(By.css( |
|
|
|
driver.findElement(By.css( |
|
|
|
'button' |
|
|
|
'button' |
|
|
|
)).click() |
|
|
|
)).click() |
|
|
|
|
|
|
|
await delay(300) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
it('should show terms of use', async () => { |
|
|
|
it('should show terms of use', async () => { |
|
|
|
await delay(300) |
|
|
|
await delay(300) |
|
|
|
const terms = await driver.findElement(By.css('.terms-header')).getText() |
|
|
|
const terms = await driver.findElement(By.css('.terms-header')).getText() |
|
|
|
assert.equal(terms, 'TERMS OF USE', 'shows terms of use') |
|
|
|
assert.equal(terms, 'TERMS OF USE', 'shows terms of use') |
|
|
|
|
|
|
|
await delay(300) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
it('should be unable to continue without scolling throught the terms of use', async () => { |
|
|
|
it('should be unable to continue without scolling throught the terms of use', async () => { |
|
|
@ -59,6 +61,7 @@ describe('Metamask popup page', function () { |
|
|
|
'Attributions' |
|
|
|
'Attributions' |
|
|
|
)) |
|
|
|
)) |
|
|
|
await driver.executeScript('arguments[0].scrollIntoView(true)', element) |
|
|
|
await driver.executeScript('arguments[0].scrollIntoView(true)', element) |
|
|
|
|
|
|
|
await delay(300) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
it('should be able to continue when scrolled to the bottom of terms of use', async () => { |
|
|
|
it('should be able to continue when scrolled to the bottom of terms of use', async () => { |
|
|
@ -67,10 +70,10 @@ describe('Metamask popup page', function () { |
|
|
|
await delay(500) |
|
|
|
await delay(500) |
|
|
|
assert.equal(buttonEnabled, true, 'enabled continue button') |
|
|
|
assert.equal(buttonEnabled, true, 'enabled continue button') |
|
|
|
await button.click() |
|
|
|
await button.click() |
|
|
|
|
|
|
|
await delay(300) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
it('should accept password with length of eight', async () => { |
|
|
|
it('should accept password with length of eight', async () => { |
|
|
|
await delay(300) |
|
|
|
|
|
|
|
const passwordBox = await driver.findElement(By.id('password-box')) |
|
|
|
const passwordBox = await driver.findElement(By.id('password-box')) |
|
|
|
const passwordBoxConfirm = await driver.findElement(By.id('password-box-confirm')) |
|
|
|
const passwordBoxConfirm = await driver.findElement(By.id('password-box-confirm')) |
|
|
|
const button = driver.findElement(By.css('button')) |
|
|
|
const button = driver.findElement(By.css('button')) |
|
|
@ -86,13 +89,13 @@ describe('Metamask popup page', function () { |
|
|
|
this.seedPhase = await driver.findElement(By.css('.twelve-word-phrase')).getText() |
|
|
|
this.seedPhase = await driver.findElement(By.css('.twelve-word-phrase')).getText() |
|
|
|
const continueAfterSeedPhrase = await driver.findElement(By.css('button')) |
|
|
|
const continueAfterSeedPhrase = await driver.findElement(By.css('button')) |
|
|
|
await continueAfterSeedPhrase.click() |
|
|
|
await continueAfterSeedPhrase.click() |
|
|
|
|
|
|
|
await delay(300) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
it('should show lock account', async () => { |
|
|
|
it('should show lock account', async () => { |
|
|
|
await delay(300) |
|
|
|
|
|
|
|
await driver.findElement(By.css('.sandwich-expando')).click() |
|
|
|
await driver.findElement(By.css('.sandwich-expando')).click() |
|
|
|
await delay(500) |
|
|
|
await delay(500) |
|
|
|
await driver.findElement(By.css('#app-content > div > div > div:nth-child(3) > span > div > li:nth-child(3)')).click() |
|
|
|
await driver.findElement(By.css('#app-content > div > div:nth-child(3) > span > div > li:nth-child(3)')).click() |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
it('should accept account password after lock', async () => { |
|
|
|
it('should accept account password after lock', async () => { |
|
|
|