test - e2e - clear phishing warning
This commit is contained in:
parent
722c5ae821
commit
564bb9f652
|
@ -145,6 +145,9 @@ describe('MetaMask', function () {
|
||||||
await delay(regularDelayMs)
|
await delay(regularDelayMs)
|
||||||
|
|
||||||
// phishing notice
|
// phishing notice
|
||||||
|
const noticeElement = await driver.findElement(By.css('.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('.tou button'))
|
||||||
await nextScreen.click()
|
await nextScreen.click()
|
||||||
await delay(regularDelayMs)
|
await delay(regularDelayMs)
|
||||||
|
|
|
@ -71,6 +71,7 @@ describe('Metamask popup page', function () {
|
||||||
it('matches MetaMask title', async () => {
|
it('matches MetaMask title', async () => {
|
||||||
const title = await driver.getTitle()
|
const title = await driver.getTitle()
|
||||||
assert.equal(title, 'MetaMask', 'title matches MetaMask')
|
assert.equal(title, 'MetaMask', 'title matches MetaMask')
|
||||||
|
await delay(300)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('show terms of use', async () => {
|
it('show terms of use', async () => {
|
||||||
|
@ -93,7 +94,6 @@ describe('Metamask popup page', function () {
|
||||||
})
|
})
|
||||||
|
|
||||||
it('shows privacy notice', async () => {
|
it('shows privacy notice', async () => {
|
||||||
await delay(300)
|
|
||||||
const privacy = await driver.findElement(By.css('.terms-header')).getText()
|
const privacy = await driver.findElement(By.css('.terms-header')).getText()
|
||||||
assert.equal(privacy, 'PRIVACY NOTICE', 'shows privacy notice')
|
assert.equal(privacy, 'PRIVACY NOTICE', 'shows privacy notice')
|
||||||
await driver.findElement(By.css('button')).click()
|
await driver.findElement(By.css('button')).click()
|
||||||
|
@ -104,6 +104,9 @@ describe('Metamask popup page', function () {
|
||||||
await delay(300)
|
await delay(300)
|
||||||
const noticeHeader = await driver.findElement(By.css('.terms-header')).getText()
|
const noticeHeader = await driver.findElement(By.css('.terms-header')).getText()
|
||||||
assert.equal(noticeHeader, 'PHISHING WARNING', 'shows phishing warning')
|
assert.equal(noticeHeader, 'PHISHING WARNING', 'shows phishing warning')
|
||||||
|
const element = await driver.findElement(By.css('.markdown'))
|
||||||
|
await driver.executeScript('arguments[0].scrollTop = arguments[0].scrollHeight', element)
|
||||||
|
await delay(300)
|
||||||
await driver.findElement(By.css('button')).click()
|
await driver.findElement(By.css('button')).click()
|
||||||
await delay(300)
|
await delay(300)
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue