Skip to content

Commit

Permalink
Merge branch 'handle-fast-withdrawals-orbit-form' of github.com:Offch…
Browse files Browse the repository at this point in the history
…ainLabs/arbitrum-token-bridge into handle-fast-withdrawals-orbit-form
  • Loading branch information
brtkx committed Nov 20, 2024
2 parents 33aca9f + 823ffb2 commit 69a1349
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 13 deletions.
2 changes: 2 additions & 0 deletions packages/arb-token-bridge-ui/tests/e2e/cypress.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
findGasFeeSummary,
findGasFeeForChain,
findMoveFundsButton,
startTransfer,
findSelectTokenButton,
openTransactionDetails,
closeTransactionDetails,
Expand Down Expand Up @@ -64,6 +65,7 @@ declare global {
findGasFeeForChain: typeof findGasFeeForChain
findGasFeeSummary: typeof findGasFeeSummary
findMoveFundsButton: typeof findMoveFundsButton
startTransfer: typeof startTransfer
findSelectTokenButton: typeof findSelectTokenButton
openTransactionDetails: typeof openTransactionDetails
closeTransactionDetails: typeof closeTransactionDetails
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,7 @@ describe('Batch Deposit', () => {
}

context('should deposit successfully', () => {
cy.findMoveFundsButton().click()
cy.confirmMetamaskTransaction()
cy.startTransfer()
cy.findTransactionInTransactionHistory({
...txData,
duration: depositTime
Expand Down Expand Up @@ -237,8 +236,7 @@ describe('Batch Deposit', () => {
}

context('should deposit successfully', () => {
cy.findMoveFundsButton().click()
cy.confirmMetamaskTransaction()
cy.startTransfer()
cy.findTransactionInTransactionHistory({
...txData,
duration: depositTime
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ describe('Deposit Token', () => {
})

context('should deposit successfully', () => {
cy.findMoveFundsButton().click()
cy.confirmMetamaskTransaction()
cy.startTransfer()
cy.findTransactionInTransactionHistory({
duration: depositTime,
amount: ERC20AmountToSend,
Expand Down Expand Up @@ -131,8 +130,7 @@ describe('Deposit Token', () => {
})

context('should deposit successfully', () => {
cy.findMoveFundsButton().click()
cy.confirmMetamaskTransaction()
cy.startTransfer()
const txData = {
amount: ERC20AmountToSend,
symbol: testCase.symbol
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ describe('Deposit native token', () => {
cy.findGasFeeSummary(zeroToLessThanOneEth)
cy.findGasFeeForChain(getL1NetworkName(), zeroToLessThanOneEth)
cy.findGasFeeForChain(getL2NetworkName(), zeroToLessThanOneNativeToken)
cy.findMoveFundsButton().click()
cy.confirmMetamaskTransaction()
cy.startTransfer()
cy.findTransactionInTransactionHistory({
duration: depositTime,
amount: ETHAmountToDeposit,
Expand All @@ -54,8 +53,7 @@ describe('Deposit native token', () => {
cy.findGasFeeSummary(zeroToLessThanOneEth)
cy.findGasFeeForChain(getL1NetworkName(), zeroToLessThanOneEth)
cy.findGasFeeForChain(getL2NetworkName(), zeroToLessThanOneNativeToken)
cy.findMoveFundsButton().click()
cy.confirmMetamaskTransaction()
cy.startTransfer()

const txData = {
amount: ETHAmountToDeposit,
Expand Down
10 changes: 9 additions & 1 deletion packages/arb-token-bridge-ui/tests/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export const openTransactionsPanel = (tab: 'pending' | 'settled') => {
.should('be.visible'),
{
errorMsg: 'Failed to fetch transactions.',
timeout: 30_000,
timeout: 120_000,
interval: 500
}
)
Expand Down Expand Up @@ -247,6 +247,13 @@ export function findMoveFundsButton(): Cypress.Chainable<JQuery<HTMLElement>> {
.should('be.visible')
}

export function startTransfer() {
cy.wait(5_000)
cy.findMoveFundsButton().click()
cy.wait(15_000)
cy.confirmMetamaskTransaction()
}

export function findSelectTokenButton(
text: string
): Cypress.Chainable<JQuery<HTMLElement>> {
Expand Down Expand Up @@ -397,6 +404,7 @@ Cypress.Commands.addAll({
findGasFeeForChain,
findGasFeeSummary,
findMoveFundsButton,
startTransfer,
findSelectTokenButton,
closeTransactionHistoryPanel,
openTransactionDetails,
Expand Down

0 comments on commit 69a1349

Please sign in to comment.