aboutsummaryrefslogtreecommitdiffstats
path: root/test/e2e
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2018-06-11 21:06:15 +0800
committerDan <danjm.com@gmail.com>2018-06-27 21:31:25 +0800
commite293233c5e5f2f85054af1918ecb3f0e9c4dbd8b (patch)
tree6baf90b3dbb375c9ff994f8b8eb964a8ae43c7e9 /test/e2e
parent1d8f257832a91757a874bd4221c3a3494aba0f7b (diff)
downloadtangerine-wallet-browser-e293233c5e5f2f85054af1918ecb3f0e9c4dbd8b.tar
tangerine-wallet-browser-e293233c5e5f2f85054af1918ecb3f0e9c4dbd8b.tar.gz
tangerine-wallet-browser-e293233c5e5f2f85054af1918ecb3f0e9c4dbd8b.tar.bz2
tangerine-wallet-browser-e293233c5e5f2f85054af1918ecb3f0e9c4dbd8b.tar.lz
tangerine-wallet-browser-e293233c5e5f2f85054af1918ecb3f0e9c4dbd8b.tar.xz
tangerine-wallet-browser-e293233c5e5f2f85054af1918ecb3f0e9c4dbd8b.tar.zst
tangerine-wallet-browser-e293233c5e5f2f85054af1918ecb3f0e9c4dbd8b.zip
Improve reliability of beta e2e tests by using webdriver apis to wait for certain dom elements.
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/beta/from-import-beta-ui.spec.js5
-rw-r--r--test/e2e/beta/metamask-beta-ui.spec.js12
2 files changed, 12 insertions, 5 deletions
diff --git a/test/e2e/beta/from-import-beta-ui.spec.js b/test/e2e/beta/from-import-beta-ui.spec.js
index dea963a73..38fdedcec 100644
--- a/test/e2e/beta/from-import-beta-ui.spec.js
+++ b/test/e2e/beta/from-import-beta-ui.spec.js
@@ -167,8 +167,7 @@ describe('Using MetaMask with an existing account', function () {
describe('Show account information', () => {
it('shows the correct account address', async () => {
- const detailsButton = await findElement(driver, By.xpath(`//button[contains(text(), 'Details')]`))
- detailsButton.click()
+ await driver.findElement(By.css('.wallet-view__details-button')).click()
await driver.findElement(By.css('.qr-wrapper')).isDisplayed()
await delay(regularDelayMs)
@@ -264,8 +263,10 @@ describe('Using MetaMask with an existing account', function () {
await configureGas.click()
await delay(regularDelayMs)
+ const gasModal = await driver.findElement(By.css('span .modal'))
const save = await findElement(driver, By.xpath(`//button[contains(text(), 'Save')]`))
await save.click()
+ await driver.wait(until.stalenessOf(gasModal))
await delay(regularDelayMs)
// Continue to next screen
diff --git a/test/e2e/beta/metamask-beta-ui.spec.js b/test/e2e/beta/metamask-beta-ui.spec.js
index 2d41d80cc..736cbc916 100644
--- a/test/e2e/beta/metamask-beta-ui.spec.js
+++ b/test/e2e/beta/metamask-beta-ui.spec.js
@@ -136,6 +136,7 @@ describe('MetaMask', function () {
await driver.executeScript('arguments[0].scrollIntoView(true)', bottomOfTos)
await delay(regularDelayMs)
const acceptTos = await findElement(driver, By.css('.tou button'))
+ driver.wait(until.elementIsEnabled(acceptTos))
await acceptTos.click()
await delay(regularDelayMs)
})
@@ -160,8 +161,9 @@ describe('MetaMask', function () {
let seedPhrase
it('reveals the seed phrase', async () => {
- await driver.wait(until.elementIsVisible(By.css('.backup-phrase__reveal-button')))
- const revealSeedPhraseButton = await findElement(driver, By.css('.backup-phrase__reveal-button'), 10000)
+ const byRevealButton = By.css('.backup-phrase__secret-blocker .backup-phrase__reveal-button')
+ await driver.wait(until.elementLocated(byRevealButton, 10000))
+ const revealSeedPhraseButton = await findElement(driver, byRevealButton, 10000)
await revealSeedPhraseButton.click()
await delay(regularDelayMs)
@@ -245,8 +247,12 @@ describe('MetaMask', function () {
await driver.findElement(By.css('.qr-wrapper')).isDisplayed()
await delay(regularDelayMs)
+ let accountModal = await driver.findElement(By.css('span .modal'))
+
await driver.executeScript("document.querySelector('.account-modal-close').click()")
- await delay(regularDelayMs * 4)
+
+ await driver.wait(until.stalenessOf(accountModal))
+ await delay(regularDelayMs)
})
})