aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorChi Kei Chan <chikeichan@gmail.com>2019-02-27 02:30:41 +0800
committerWhymarrh Whitby <whymarrh.whitby@gmail.com>2019-02-27 02:30:41 +0800
commita2320c76fef084b7ec01839ab9c17b474839b3c0 (patch)
tree7620668c68c0de4e0de6ef745beb2cdc508ff50b /test
parentfc1655eecbf3da969dc9c9a8fc3ae95221ffa30b (diff)
downloadtangerine-wallet-browser-a2320c76fef084b7ec01839ab9c17b474839b3c0.tar
tangerine-wallet-browser-a2320c76fef084b7ec01839ab9c17b474839b3c0.tar.gz
tangerine-wallet-browser-a2320c76fef084b7ec01839ab9c17b474839b3c0.tar.bz2
tangerine-wallet-browser-a2320c76fef084b7ec01839ab9c17b474839b3c0.tar.lz
tangerine-wallet-browser-a2320c76fef084b7ec01839ab9c17b474839b3c0.tar.xz
tangerine-wallet-browser-a2320c76fef084b7ec01839ab9c17b474839b3c0.tar.zst
tangerine-wallet-browser-a2320c76fef084b7ec01839ab9c17b474839b3c0.zip
Show/Hide Fiat on Testnets based on User Preference (#6153)
Diffstat (limited to 'test')
-rw-r--r--test/e2e/beta/metamask-beta-ui.spec.js38
1 files changed, 28 insertions, 10 deletions
diff --git a/test/e2e/beta/metamask-beta-ui.spec.js b/test/e2e/beta/metamask-beta-ui.spec.js
index bde031301..798cce372 100644
--- a/test/e2e/beta/metamask-beta-ui.spec.js
+++ b/test/e2e/beta/metamask-beta-ui.spec.js
@@ -495,10 +495,13 @@ describe('MetaMask', function () {
await findElement(driver, By.css('.tab-bar'))
+ const showConversionToggle = await findElement(driver, By.css('.settings-page__content-row:nth-of-type(3) .settings-page__content-item-col > div'))
+ await showConversionToggle.click()
+
const advancedGasTitle = await findElement(driver, By.xpath(`//span[contains(text(), 'Advanced gas controls')]`))
await driver.executeScript('arguments[0].scrollIntoView(true)', advancedGasTitle)
- const advancedGasToggle = await findElement(driver, By.css('.settings-page__content-row:nth-of-type(11) .settings-page__content-item-col > div'))
+ const advancedGasToggle = await findElement(driver, By.css('.settings-page__content-row:nth-of-type(12) .settings-page__content-item-col > div'))
await advancedGasToggle.click()
windowHandles = await driver.getAllWindowHandles()
extension = windowHandles[0]
@@ -560,23 +563,37 @@ describe('MetaMask', function () {
await delay(regularDelayMs)
})
+ let txValues
+
it('finds the transaction in the transactions list', async function () {
const transactions = await findElements(driver, By.css('.transaction-list-item'))
assert.equal(transactions.length, 4)
- const txValues = await findElement(driver, By.css('.transaction-list-item__amount--primary'))
- await driver.wait(until.elementTextMatches(txValues, /-3\s*ETH/), 10000)
+ txValues = await findElements(driver, By.css('.transaction-list-item__amount--primary'))
+ await driver.wait(until.elementTextMatches(txValues[0], /-3\s*ETH/), 10000)
})
it('the transaction has the expected gas price', async function () {
- const txValues = await findElement(driver, By.css('.transaction-list-item__amount--primary'))
- await txValues.click()
- await delay(tinyDelayMs)
- await findElement(driver, By.xpath(`//div[contains(text(), 'Gas Price (GWEI)')]`))
-
- await findElement(driver, By.xpath(`//span[contains(text(), '7')]`))
+ await delay(largeDelayMs)
+ let txGasPriceLabels
+ let txGasPrices
+ try {
+ await txValues[0].click()
+ txGasPrices = await findElements(driver, By.css('.transaction-breakdown__value'))
+ txGasPriceLabels = await findElements(driver, By.css('.transaction-breakdown-row__title'))
+ txGasPrices = await findElements(driver, By.css('.transaction-breakdown__value'))
+ await driver.wait(until.elementTextMatches(txGasPrices[3], /^10$/), 10000)
+ } catch (e) {
+ console.log(e.message)
+ txValues = await findElements(driver, By.css('.transaction-list-item__amount--primary'))
+ await txValues[0].click()
+ txGasPriceLabels = await findElements(driver, By.css('.transaction-breakdown-row__title'))
+ txGasPrices = await findElements(driver, By.css('.transaction-breakdown__value'))
+ await driver.wait(until.elementTextMatches(txGasPrices[3], /^10$/), 10000)
+ }
+ assert(txGasPriceLabels[2])
- txValues.click()
+ await txValues[0].click()
})
})
@@ -1125,6 +1142,7 @@ describe('MetaMask', function () {
return confirmedTxes.length === 2
}, 10000)
+ await delay(regularDelayMs)
const txValues = await findElements(driver, By.css('.transaction-list-item__amount--primary'))
await driver.wait(until.elementTextMatches(txValues[0], /-7\s*TST/))
const txStatuses = await findElements(driver, By.css('.transaction-list-item__action'))