Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
brtkx committed Dec 19, 2024
1 parent 8228737 commit 9bfa84f
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ describe('Batch Deposit', () => {

cy.waitUntil(() => cy.findTransactionInTransactionHistory(txData), {
errorMsg: 'Could not find settled ERC20 Batch Deposit transaction',
timeout: 60_000,
timeout: 120_000,
interval: 500
})

Expand Down Expand Up @@ -253,7 +253,7 @@ describe('Batch Deposit', () => {

cy.waitUntil(() => cy.findTransactionInTransactionHistory(txData), {
errorMsg: 'Could not find settled ERC20 Batch Deposit transaction',
timeout: 60_000,
timeout: 120_000,
interval: 500
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ describe('Deposit Token', () => {
}),
{
errorMsg: 'Could not find settled ERC20 Deposit transaction',
timeout: 60_000,
timeout: 120_000,
interval: 500
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ describe('Withdraw ERC20 Token', () => {
})

context('should show clickable withdraw button', () => {
cy.startTransfer()
cy.startTransfer({ confirmMetamaskTransaction: false })
})

context('should withdraw successfully', () => {
Expand Down Expand Up @@ -218,7 +218,7 @@ describe('Withdraw ERC20 Token', () => {
})

context('should show clickable withdraw button', () => {
cy.startTransfer()
cy.startTransfer({ confirmMetamaskTransaction: false })
})

context('should initiate withdrawal successfully', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ describe('Withdraw native token', () => {
ETHToWithdraw = Number((Math.random() * 0.001).toFixed(5)) // generate a new withdrawal amount for each test-run attempt so that findAllByText doesn't stall coz of prev transactions
cy.login({ networkType: 'childChain' })
cy.typeAmount(ETHToWithdraw)
cy.startTransfer()
cy.startTransfer({ confirmMetamaskTransaction: false })
cy.findByText(/Arbitrum’s bridge/i).should('be.visible')

// the Continue withdrawal button should be disabled at first
Expand Down Expand Up @@ -146,7 +146,7 @@ describe('Withdraw native token', () => {

cy.typeAmount(ETHToWithdraw)
cy.fillCustomDestinationAddress()
cy.startTransfer()
cy.startTransfer({ confirmMetamaskTransaction: false })
cy.findByText(/Arbitrum’s bridge/i).should('be.visible')

// the Continue withdrawal button should be disabled at first
Expand Down
10 changes: 8 additions & 2 deletions packages/arb-token-bridge-ui/tests/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,17 @@ export function findMoveFundsButton(): Cypress.Chainable<JQuery<HTMLElement>> {
.should('be.visible')
}

export function startTransfer() {
export function startTransfer({
confirmMetamaskTransaction = true
}: {
confirmMetamaskTransaction?: boolean
}) {
cy.wait(5_000)
cy.findMoveFundsButton().click()
cy.wait(15_000)
cy.confirmMetamaskTransaction()
if (confirmMetamaskTransaction) {
cy.confirmMetamaskTransaction()
}
}

export function findSelectTokenButton(
Expand Down

0 comments on commit 9bfa84f

Please sign in to comment.