aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorThomas Huang <tmashuang@users.noreply.github.com>2018-05-15 01:56:49 +0800
committerGitHub <noreply@github.com>2018-05-15 01:56:49 +0800
commit6e79225dbff512ab9bcae2731bcfc4ce33e98664 (patch)
treed5edee88dff8220117a857534e2a7a6ee45020ab /test
parenta08f08462c4c407daf0f78705b4753bc34018a3e (diff)
parent6926e4e9d26518e644ec9f8bd3316af087a52c9f (diff)
downloadtangerine-wallet-browser-6e79225dbff512ab9bcae2731bcfc4ce33e98664.tar
tangerine-wallet-browser-6e79225dbff512ab9bcae2731bcfc4ce33e98664.tar.gz
tangerine-wallet-browser-6e79225dbff512ab9bcae2731bcfc4ce33e98664.tar.bz2
tangerine-wallet-browser-6e79225dbff512ab9bcae2731bcfc4ce33e98664.tar.lz
tangerine-wallet-browser-6e79225dbff512ab9bcae2731bcfc4ce33e98664.tar.xz
tangerine-wallet-browser-6e79225dbff512ab9bcae2731bcfc4ce33e98664.tar.zst
tangerine-wallet-browser-6e79225dbff512ab9bcae2731bcfc4ce33e98664.zip
Merge pull request #4251 from whymarrh/e2e-fixes
Small e2e test adjustments
Diffstat (limited to 'test')
-rw-r--r--test/e2e/chrome/metamask.spec.js4
-rw-r--r--test/e2e/firefox/metamask.spec.js5
2 files changed, 5 insertions, 4 deletions
diff --git a/test/e2e/chrome/metamask.spec.js b/test/e2e/chrome/metamask.spec.js
index d72ebe1a9..b17d4c818 100644
--- a/test/e2e/chrome/metamask.spec.js
+++ b/test/e2e/chrome/metamask.spec.js
@@ -237,7 +237,7 @@ describe('Metamask popup page', function () {
it('confirms transaction in MetaMask popup', async function () {
const windowHandles = await driver.getAllWindowHandles()
- await driver.switchTo().window(windowHandles[2])
+ await driver.switchTo().window(windowHandles[windowHandles.length - 1])
const metamaskSubmit = await driver.findElement(By.css('#pending-tx-form > div.flex-row.flex-space-around.conf-buttons > input'))
await metamaskSubmit.click()
await delay(1000)
@@ -291,7 +291,7 @@ describe('Metamask popup page', function () {
})
async function getExtensionId () {
- const extension = await driver.executeScript('return document.querySelector("extensions-manager").shadowRoot.querySelector("extensions-view-manager extensions-item-list").shadowRoot.querySelector("#container > div.items-container > extensions-item:nth-child(2)").getAttribute("id")')
+ const extension = await driver.executeScript('return document.querySelector("extensions-manager").shadowRoot.querySelector("extensions-view-manager extensions-item-list").shadowRoot.querySelector("extensions-item:nth-child(2)").getAttribute("id")')
return extension
}
diff --git a/test/e2e/firefox/metamask.spec.js b/test/e2e/firefox/metamask.spec.js
index 20b8a5092..c75b1a9b5 100644
--- a/test/e2e/firefox/metamask.spec.js
+++ b/test/e2e/firefox/metamask.spec.js
@@ -59,6 +59,7 @@ describe('', function () {
})
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()
@@ -125,7 +126,7 @@ describe('', function () {
it('accepts account password after lock', async () => {
await delay(500)
await driver.findElement(By.id('password-box')).sendKeys('123456789')
- await driver.findElement(By.css('button')).click()
+ await driver.findElement(By.id('password-box')).sendKeys(webdriver.Key.ENTER)
await delay(500)
})
@@ -238,7 +239,7 @@ describe('', function () {
// There is an issue with blank confirmation window, but the button is still there and the driver is able to clicked (?.?)
it('confirms transaction in MetaMask popup', async function () {
const windowHandles = await driver.getAllWindowHandles()
- await driver.switchTo().window(windowHandles[2])
+ await driver.switchTo().window(windowHandles[windowHandles.length - 1])
const metamaskSubmit = await driver.findElement(By.css('#pending-tx-form > div.flex-row.flex-space-around.conf-buttons > input'))
await metamaskSubmit.click()
await delay(1000)