Skip to content

Commit

Permalink
Update e2e tests to work with getMethodData() fallback changes
Browse files Browse the repository at this point in the history
  • Loading branch information
danjm committed Mar 29, 2019
1 parent f057d9c commit a425761
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/e2e/beta/metamask-beta-ui.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,7 @@ describe('MetaMask', function () {

const functionType = await findElement(driver, By.css('.confirm-page-container-content__function-type'))
const functionTypeText = await functionType.getText()
assert.equal(functionTypeText, 'Not Found')
assert.equal(functionTypeText, 'Transfer')

const confirmDataDiv = await findElement(driver, By.css('.confirm-page-container-content__data-box'))
const confirmDataText = await confirmDataDiv.getText()
Expand Down Expand Up @@ -1040,7 +1040,7 @@ describe('MetaMask', function () {
return confirmedTxes.length === 1
}, 10000)
const txStatuses = await findElements(driver, By.css('.transaction-list-item__action'))
await driver.wait(until.elementTextMatches(txStatuses[0], /Contract\sInteraction/i), 10000)
await driver.wait(until.elementTextMatches(txStatuses[0], /Sent\sToken/i), 10000)
})
})

Expand Down Expand Up @@ -1124,7 +1124,7 @@ describe('MetaMask', function () {
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'))
await driver.wait(until.elementTextMatches(txStatuses[0], /Contract\sInteraction/), 10000)
await driver.wait(until.elementTextMatches(txStatuses[0], /Sent\sToken/), 10000)

const walletBalance = await findElement(driver, By.css('.wallet-balance'))
await walletBalance.click()
Expand All @@ -1142,7 +1142,7 @@ describe('MetaMask', function () {
})
})

describe.skip('Approves a custom token from dapp', () => {
describe('Approves a custom token from dapp', () => {
let gasModal
it('approves an already created token', async () => {
const windowHandles = await driver.getAllWindowHandles()
Expand Down Expand Up @@ -1180,11 +1180,11 @@ describe('MetaMask', function () {

const functionType = await findElement(driver, By.css('.confirm-page-container-content__function-type'))
const functionTypeText = await functionType.getText()
assert.equal(functionTypeText, 'Not Found')
assert.equal(functionTypeText, 'Approve')

const confirmDataDiv = await findElement(driver, By.css('.confirm-page-container-content__data-box'))
const confirmDataText = await confirmDataDiv.getText()
assert.equal(confirmDataText.match(/0x095ea7b30000000000000000000000002f318c334780961fb129d2a6c30d0763d9a5c97/))
assert(confirmDataText.match(/0x095ea7b30000000000000000000000002f318c334780961fb129d2a6c30d0763d9a5c97/))

const detailsTab = await findElement(driver, By.xpath(`//li[contains(text(), 'Details')]`))
detailsTab.click()
Expand Down

0 comments on commit a425761

Please sign in to comment.