aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2018-06-26 22:43:28 +0800
committerDan <danjm.com@gmail.com>2018-06-27 21:38:17 +0800
commita25f5483d84c160586029d1fda7e06374ab923bc (patch)
treecd2422f4891a33ac89810f35959fd8b72bf3e41f
parentb029085fbe2d3539fa125d23debef30d0a6aa9d3 (diff)
downloadtangerine-wallet-browser-a25f5483d84c160586029d1fda7e06374ab923bc.tar
tangerine-wallet-browser-a25f5483d84c160586029d1fda7e06374ab923bc.tar.gz
tangerine-wallet-browser-a25f5483d84c160586029d1fda7e06374ab923bc.tar.bz2
tangerine-wallet-browser-a25f5483d84c160586029d1fda7e06374ab923bc.tar.lz
tangerine-wallet-browser-a25f5483d84c160586029d1fda7e06374ab923bc.tar.xz
tangerine-wallet-browser-a25f5483d84c160586029d1fda7e06374ab923bc.tar.zst
tangerine-wallet-browser-a25f5483d84c160586029d1fda7e06374ab923bc.zip
Fix retype seed phrase button.
-rw-r--r--test/e2e/beta/metamask-beta-ui.spec.js81
1 files changed, 46 insertions, 35 deletions
diff --git a/test/e2e/beta/metamask-beta-ui.spec.js b/test/e2e/beta/metamask-beta-ui.spec.js
index 46e8620f8..36295adac 100644
--- a/test/e2e/beta/metamask-beta-ui.spec.js
+++ b/test/e2e/beta/metamask-beta-ui.spec.js
@@ -184,57 +184,68 @@ describe('MetaMask', function () {
})
async function retypeSeedPhrase (words) {
- const word0 = await findElement(driver, By.xpath(`//button[contains(text(), '${words[0]}')]`))
- await word0.click()
- await delay(tinyDelayMs)
+ try {
+ const word0 = await findElement(driver, By.xpath(`//button[contains(text(), '${words[0]}')]`), 10000)
- const word1 = await findElement(driver, By.xpath(`//button[contains(text(), '${words[1]}')]`))
- await word1.click()
- await delay(tinyDelayMs)
+ await word0.click()
+ await delay(tinyDelayMs)
- const word2 = await findElement(driver, By.xpath(`//button[contains(text(), '${words[2]}')]`))
- await word2.click()
- await delay(tinyDelayMs)
+ const word1 = await findElement(driver, By.xpath(`//button[contains(text(), '${words[1]}')]`), 10000)
- const word3 = await findElement(driver, By.xpath(`//button[contains(text(), '${words[3]}')]`))
- await word3.click()
- await delay(tinyDelayMs)
+ await word1.click()
+ await delay(tinyDelayMs)
- const word4 = await findElement(driver, By.xpath(`//button[contains(text(), '${words[4]}')]`))
- await word4.click()
- await delay(tinyDelayMs)
+ const word2 = await findElement(driver, By.xpath(`//button[contains(text(), '${words[2]}')]`), 10000)
- const word5 = await findElement(driver, By.xpath(`//button[contains(text(), '${words[5]}')]`))
- await word5.click()
- await delay(tinyDelayMs)
+ await word2.click()
+ await delay(tinyDelayMs)
- const word6 = await findElement(driver, By.xpath(`//button[contains(text(), '${words[6]}')]`))
- await word6.click()
- await delay(tinyDelayMs)
+ const word3 = await findElement(driver, By.xpath(`//button[contains(text(), '${words[3]}')]`), 10000)
- const word7 = await findElement(driver, By.xpath(`//button[contains(text(), '${words[7]}')]`))
- await word7.click()
- await delay(tinyDelayMs)
+ await word3.click()
+ await delay(tinyDelayMs)
- const word8 = await findElement(driver, By.xpath(`//button[contains(text(), '${words[8]}')]`))
- await word8.click()
- await delay(tinyDelayMs)
+ const word4 = await findElement(driver, By.xpath(`//button[contains(text(), '${words[4]}')]`), 10000)
- const word9 = await findElement(driver, By.xpath(`//button[contains(text(), '${words[9]}')]`))
- await word9.click()
- await delay(tinyDelayMs)
+ await word4.click()
+ await delay(tinyDelayMs)
- const word10 = await findElement(driver, By.xpath(`//button[contains(text(), '${words[10]}')]`))
- await word10.click()
- await delay(tinyDelayMs)
+ const word5 = await findElement(driver, By.xpath(`//button[contains(text(), '${words[5]}')]`), 10000)
- try {
+ await word5.click()
+ await delay(tinyDelayMs)
+
+ const word6 = await findElement(driver, By.xpath(`//button[contains(text(), '${words[6]}')]`), 10000)
+
+ await word6.click()
+ await delay(tinyDelayMs)
+
+ const word7 = await findElement(driver, By.xpath(`//button[contains(text(), '${words[7]}')]`), 10000)
+
+ await word7.click()
+ await delay(tinyDelayMs)
+
+ const word8 = await findElement(driver, By.xpath(`//button[contains(text(), '${words[8]}')]`), 10000)
+
+ await word8.click()
+ await delay(tinyDelayMs)
+
+ const word9 = await findElement(driver, By.xpath(`//button[contains(text(), '${words[9]}')]`), 10000)
+
+ await word9.click()
+ await delay(tinyDelayMs)
+
+ const word10 = await findElement(driver, By.xpath(`//button[contains(text(), '${words[10]}')]`), 10000)
+
+ await word10.click()
+ await delay(tinyDelayMs)
+
const word11 = await findElement(driver, By.xpath(`//button[contains(text(), '${words[11]}')]`), 10000)
await word11.click()
await delay(tinyDelayMs)
} catch (e) {
await loadExtension(driver, extensionId)
- await retypeSeedPhrase
+ await retypeSeedPhrase(words)
}
}