aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorThomas Huang <tmashuang@users.noreply.github.com>2019-07-13 01:58:19 +0800
committerGitHub <noreply@github.com>2019-07-13 01:58:19 +0800
commit96a12a627ec14850155420e041f3bd55e3dce71a (patch)
tree07909b87d2eed412d63e90afb51d4e54a27c8c53 /test
parent9be7fd39ba8aa368902a738898b191fba00b01af (diff)
parent1c19ce91a421134a41f1e14a60196d8da0e778f0 (diff)
downloadtangerine-wallet-browser-96a12a627ec14850155420e041f3bd55e3dce71a.tar.gz
tangerine-wallet-browser-96a12a627ec14850155420e041f3bd55e3dce71a.tar.zst
tangerine-wallet-browser-96a12a627ec14850155420e041f3bd55e3dce71a.zip
Merge pull request #6832 from MetaMask/master-rebased
Master rebased
Diffstat (limited to 'test')
-rw-r--r--test/e2e/metamask-ui.spec.js26
1 files changed, 19 insertions, 7 deletions
diff --git a/test/e2e/metamask-ui.spec.js b/test/e2e/metamask-ui.spec.js
index 6b3bec1ef..f9f52670b 100644
--- a/test/e2e/metamask-ui.spec.js
+++ b/test/e2e/metamask-ui.spec.js
@@ -340,7 +340,7 @@ describe('MetaMask', function () {
it('confirms the transaction', async function () {
const confirmButton = await findElement(driver, By.xpath(`//button[contains(text(), 'Confirm')]`))
await confirmButton.click()
- await delay(largeDelayMs)
+ await delay(largeDelayMs * 2)
})
it('finds the transaction in the transactions list', async function () {
@@ -428,6 +428,10 @@ describe('MetaMask', function () {
})
it('confirms the transaction', async function () {
+ const transactionAmounts = await findElements(driver, By.css('.currency-display-component__text'))
+ const transactionAmount = transactionAmounts[0]
+ assert.equal(await transactionAmount.getText(), '1')
+
const confirmButton = await findElement(driver, By.xpath(`//button[contains(text(), 'Confirm')]`))
await confirmButton.click()
await delay(largeDelayMs)
@@ -528,7 +532,7 @@ describe('MetaMask', function () {
await delay(50)
await gasLimitInput.sendKeys('25000')
- await delay(tinyDelayMs)
+ await delay(largeDelayMs * 2)
const confirmButton = await findElement(driver, By.xpath(`//button[contains(text(), 'Confirm')]`), 10000)
await confirmButton.click()
@@ -685,11 +689,13 @@ describe('MetaMask', function () {
})
it('confirms a transaction', async () => {
+ await delay(tinyDelayMs)
const confirmButton = await findElement(driver, By.xpath(`//button[contains(text(), 'Confirm')]`), 10000)
await confirmButton.click()
- await delay(regularDelayMs)
+ await delay(largeDelayMs * 2)
const navigationElement = await findElement(driver, By.css('.confirm-page-container-navigation'))
+ await delay(tinyDelayMs)
const navigationText = await navigationElement.getText()
assert.equal(navigationText.includes('4'), true, 'transaction confirmed')
})
@@ -792,7 +798,7 @@ describe('MetaMask', function () {
await driver.wait(until.elementTextMatches(contractStatus, /Deposit\sinitiated/), 10000)
await driver.switchTo().window(extension)
- await delay(largeDelayMs)
+ await delay(largeDelayMs * 2)
await findElements(driver, By.css('.transaction-list-item'))
const [txListValue] = await findElements(driver, By.css('.transaction-list-item__amount--primary'))
@@ -812,6 +818,8 @@ describe('MetaMask', function () {
await delay(regularDelayMs)
const [gasPriceInput, gasLimitInput] = await findElements(driver, By.css('.advanced-tab__gas-edit-row__input'))
+ const gasLimitValue = await gasLimitInput.getAttribute('value')
+ assert(Number(gasLimitValue) < 100000, 'Gas Limit too high')
await gasPriceInput.sendKeys(Key.chord(Key.CONTROL, 'a'))
await delay(50)
@@ -870,7 +878,7 @@ describe('MetaMask', function () {
await delay(regularDelayMs)
await driver.switchTo().window(extension)
- await delay(regularDelayMs)
+ await delay(largeDelayMs * 2)
const txListItem = await findElement(driver, By.css('.transaction-list-item'))
await txListItem.click()
@@ -1102,6 +1110,10 @@ describe('MetaMask', function () {
await txListValue.click()
await delay(regularDelayMs)
+ const transactionAmounts = await findElements(driver, By.css('.currency-display-component__text'))
+ const transactionAmount = transactionAmounts[0]
+ assert(await transactionAmount.getText(), '1.5 TST')
+
// Set the gas limit
const configureGas = await driver.wait(until.elementLocated(By.css('.confirm-detail-row__header-text--edit')), 10000)
await configureGas.click()
@@ -1340,10 +1352,10 @@ describe('MetaMask', function () {
})
it('submits the transaction', async function () {
- await delay(regularDelayMs)
+ await delay(largeDelayMs * 2)
const confirmButton = await findElement(driver, By.xpath(`//button[contains(text(), 'Confirm')]`))
await confirmButton.click()
- await delay(regularDelayMs)
+ await delay(largeDelayMs * 2)
})
it('finds the transaction in the transactions list', async function () {