aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorThomas <tmashuang@gmail.com>2018-03-10 15:57:44 +0800
committerThomas <tmashuang@gmail.com>2018-03-10 15:57:44 +0800
commita62fe4f7eae1c615c15c56109eb40874e811d25f (patch)
tree5fd7ba116b202c1db64628373960877f868df5f7 /test
parentc18f2a17fc86640ff3a91cb14b35a85888612a75 (diff)
downloadtangerine-wallet-browser-a62fe4f7eae1c615c15c56109eb40874e811d25f.tar
tangerine-wallet-browser-a62fe4f7eae1c615c15c56109eb40874e811d25f.tar.gz
tangerine-wallet-browser-a62fe4f7eae1c615c15c56109eb40874e811d25f.tar.bz2
tangerine-wallet-browser-a62fe4f7eae1c615c15c56109eb40874e811d25f.tar.lz
tangerine-wallet-browser-a62fe4f7eae1c615c15c56109eb40874e811d25f.tar.xz
tangerine-wallet-browser-a62fe4f7eae1c615c15c56109eb40874e811d25f.tar.zst
tangerine-wallet-browser-a62fe4f7eae1c615c15c56109eb40874e811d25f.zip
Update selenium tests
Diffstat (limited to 'test')
-rw-r--r--test/e2e/metamask.spec.js16
1 files changed, 7 insertions, 9 deletions
diff --git a/test/e2e/metamask.spec.js b/test/e2e/metamask.spec.js
index cf4cd0b52..c73ba2b41 100644
--- a/test/e2e/metamask.spec.js
+++ b/test/e2e/metamask.spec.js
@@ -14,10 +14,8 @@ describe('Metamask popup page', function () {
const extPath = path.resolve('dist/chrome')
driver = buildWebDriver(extPath)
await driver.get('chrome://extensions-frame')
- const elems = await driver.findElements(By.xpath(
- '//*[@id="fmmjaglpijbgopejlfapbkhhbnaagbpj"]'
- ))
- const extensionId = await elems[0].getAttribute('id')
+ const elems = await driver.findElements(By.className('extension-list-item-wrapper'))
+ const extensionId = await elems[1].getAttribute('id')
await driver.get(`chrome-extension://${extensionId}/popup.html`)
await delay(500)
})
@@ -78,12 +76,12 @@ describe('Metamask popup page', function () {
it('should accept password with length of eight', async () => {
await delay(300)
const passwordBox = await driver.findElement(By.id('password-box'))
- const passwordBoxConfirm = driver.findElement(By.id('password-box-confirm'))
+ const passwordBoxConfirm = await driver.findElement(By.id('password-box-confirm'))
const button = driver.findElement(By.css('button'))
- passwordBox.sendKeys('12345678')
- passwordBoxConfirm.sendKeys('12345678')
- await delay(300)
+ passwordBox.sendKeys('123456789')
+ passwordBoxConfirm.sendKeys('123456789')
+ await delay(500)
await button.click()
})
@@ -103,7 +101,7 @@ describe('Metamask popup page', function () {
it('should accept account password after lock', async () => {
await delay(500)
- await driver.findElement(By.id('password-box')).sendKeys('12345678')
+ await driver.findElement(By.id('password-box')).sendKeys('123456789')
await driver.findElement(By.css('button')).click()
await delay(500)
})