aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorThomas <thomas.b.huang@gmail.com>2018-05-04 04:18:54 +0800
committerThomas <thomas.b.huang@gmail.com>2018-05-04 04:18:54 +0800
commit74e36e6f8f60fed767c92f374eedcc9681f5407b (patch)
tree07c60f54e77be8fa94c696fe314116eb4081db1e /test
parent8d9d55fec3b0cbbf66b52df3a5e11449d94b5a8d (diff)
downloadtangerine-wallet-browser-74e36e6f8f60fed767c92f374eedcc9681f5407b.tar.gz
tangerine-wallet-browser-74e36e6f8f60fed767c92f374eedcc9681f5407b.tar.zst
tangerine-wallet-browser-74e36e6f8f60fed767c92f374eedcc9681f5407b.zip
Add Timeouts for driver.wait
Diffstat (limited to 'test')
-rw-r--r--test/e2e/chrome/metamask.spec.js17
1 files changed, 8 insertions, 9 deletions
diff --git a/test/e2e/chrome/metamask.spec.js b/test/e2e/chrome/metamask.spec.js
index 36d487afc..774f1cfe3 100644
--- a/test/e2e/chrome/metamask.spec.js
+++ b/test/e2e/chrome/metamask.spec.js
@@ -39,20 +39,19 @@ describe('Metamask popup page', function () {
})
it(`selects MetaMask's extension id and opens it in the current tab`, async function () {
- // For latest Chrome version (when they updated the extension view)
- // Use piercing CSS selector /deep/ to access the extension id in the Shadow Dom
- const elems = await driver.findElements(By.css('* /deep/ extensions-item'))
- extensionId = await elems[1].getAttribute('id')
- // const elems = await driver.findElements(By.css('.extension-list-item-wrapper'))
+ // // For latest Chrome version (when they updated the extension view)
+ // // Use piercing CSS selector /deep/ to access the extension id in the Shadow Dom
+ // const elems = await driver.findElements(By.css('* /deep/ extensions-item'))
// extensionId = await elems[1].getAttribute('id')
+ const elems = await driver.findElements(By.css('.extension-list-item-wrapper'))
+ extensionId = await elems[1].getAttribute('id')
await driver.get(`chrome-extension://${extensionId}/popup.html`)
await delay(500)
})
it('sets provider type to localhost', async function () {
- await driver.wait(until.elementLocated(By.css('#app-content')))
+ await driver.wait(until.elementLocated(By.css('#app-content')), 300)
await setProviderType('localhost')
- await delay(300)
})
})
@@ -68,7 +67,7 @@ describe('Metamask popup page', function () {
const privacyHeader = await driver.findElement(By.css('#app-content > div > div.app-primary.from-right > div > div.flex-column.flex-center.flex-grow > h3')).getText()
assert.equal(privacyHeader, 'PRIVACY NOTICE', 'shows privacy notice')
return privacyHeader === 'PRIVACY NOTICE'
- })
+ }, 300)
await driver.findElement(By.css('button')).click()
})
@@ -90,7 +89,7 @@ describe('Metamask popup page', function () {
it('allows the button to be clicked when scrolled to the bottom of TOU', async () => {
const button = await driver.findElement(By.css('#app-content > div > div.app-primary.from-right > div > div.flex-column.flex-center.flex-grow > button'))
- await driver.wait(until.elementIsEnabled(button))
+ await driver.wait(until.elementIsEnabled(button), 300)
const buttonEnabled = await button.isEnabled()
assert.equal(buttonEnabled, true, 'enabled continue button')
await button.click()