@ -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 ( regu larDelayMs)
await delay ( large DelayMs * 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 ( regu larDelayMs)
await delay ( large DelayMs * 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 ( regu larDelayMs)
await delay ( large DelayMs * 2 )
const confirmButton = await findElement ( driver , By . xpath ( ` //button[contains(text(), 'Confirm')] ` ) )
await confirmButton . click ( )
await delay ( regu larDelayMs)
await delay ( large DelayMs * 2 )
} )
it ( 'finds the transaction in the transactions list' , async function ( ) {