Add missing awaits and/or missing wait timeouts in test/e2e/beta/metamask-beta-ui.spec.js

feature/default_network_editable
Dan Miller 6 years ago
parent 860bf42346
commit a59e47e7b0
  1. 18
      test/e2e/beta/metamask-beta-ui.spec.js

@ -345,8 +345,8 @@ describe('MetaMask', function () {
const passwordInputs = await driver.findElements(By.css('input')) const passwordInputs = await driver.findElements(By.css('input'))
await delay(regularDelayMs) await delay(regularDelayMs)
passwordInputs[0].sendKeys('correct horse battery staple') await passwordInputs[0].sendKeys('correct horse battery staple')
passwordInputs[1].sendKeys('correct horse battery staple') await passwordInputs[1].sendKeys('correct horse battery staple')
await driver.findElement(By.css('.first-time-flow__button')).click() await driver.findElement(By.css('.first-time-flow__button')).click()
await delay(regularDelayMs) await delay(regularDelayMs)
}) })
@ -438,7 +438,7 @@ describe('MetaMask', function () {
await driver.switchTo().window(windowHandles[2]) await driver.switchTo().window(windowHandles[2])
await delay(regularDelayMs) await delay(regularDelayMs)
assertElementNotPresent(webdriver, driver, By.xpath(`//li[contains(text(), 'Data')]`)) await assertElementNotPresent(webdriver, driver, By.xpath(`//li[contains(text(), 'Data')]`))
const confirmButton = await findElement(driver, By.xpath(`//button[contains(text(), 'Confirm')]`), 10000) const confirmButton = await findElement(driver, By.xpath(`//button[contains(text(), 'Confirm')]`), 10000)
await confirmButton.click() await confirmButton.click()
@ -515,15 +515,15 @@ describe('MetaMask', function () {
await driver.switchTo().window(dapp) await driver.switchTo().window(dapp)
await delay(regularDelayMs) await delay(regularDelayMs)
let contractStatus = await driver.findElement(By.css('#contractStatus')) let contractStatus = await findElement(driver, By.css('#contractStatus'))
await driver.wait(until.elementTextMatches(contractStatus, /Deployed/)) await driver.wait(until.elementTextMatches(contractStatus, /Deployed/), 10000)
const depositButton = await findElement(driver, By.css('#depositButton')) const depositButton = await findElement(driver, By.css('#depositButton'))
await depositButton.click() await depositButton.click()
await delay(largeDelayMs) await delay(largeDelayMs)
contractStatus = await driver.findElement(By.css('#contractStatus')) contractStatus = await findElement(driver, By.css('#contractStatus'))
await driver.wait(until.elementTextMatches(contractStatus, /Deposit\sinitiated/)) await driver.wait(until.elementTextMatches(contractStatus, /Deposit\sinitiated/), 10000)
await driver.switchTo().window(extension) await driver.switchTo().window(extension)
await delay(largeDelayMs) await delay(largeDelayMs)
@ -539,8 +539,8 @@ describe('MetaMask', function () {
await configureGas.click() await configureGas.click()
await delay(regularDelayMs) await delay(regularDelayMs)
const gasModal = await driver.findElement(By.css('span .modal')) const gasModal = await findElement(driver, By.css('span .modal'))
await driver.wait(until.elementLocated(By.css('.customize-gas__title'))) await driver.wait(until.elementLocated(By.css('.customize-gas__title')), 10000)
const [gasPriceInput, gasLimitInput] = await findElements(driver, By.css('.customize-gas-input')) const [gasPriceInput, gasLimitInput] = await findElements(driver, By.css('.customize-gas-input'))
await gasPriceInput.clear() await gasPriceInput.clear()

Loading…
Cancel
Save