diff --git a/packages/arb-token-bridge-ui/tests/e2e/cypress.d.ts b/packages/arb-token-bridge-ui/tests/e2e/cypress.d.ts index b10ab68d97..af0f75e815 100644 --- a/packages/arb-token-bridge-ui/tests/e2e/cypress.d.ts +++ b/packages/arb-token-bridge-ui/tests/e2e/cypress.d.ts @@ -16,7 +16,7 @@ import { findGasFeeSummary, findGasFeeForChain, findMoveFundsButton, - startTransfer, + clickMoveFundsButton, findSelectTokenButton, openTransactionDetails, closeTransactionDetails, @@ -66,7 +66,7 @@ declare global { findGasFeeForChain: typeof findGasFeeForChain findGasFeeSummary: typeof findGasFeeSummary findMoveFundsButton: typeof findMoveFundsButton - startTransfer: typeof startTransfer + clickMoveFundsButton: typeof clickMoveFundsButton findSelectTokenButton: typeof findSelectTokenButton openTransactionDetails: typeof openTransactionDetails closeTransactionDetails: typeof closeTransactionDetails diff --git a/packages/arb-token-bridge-ui/tests/e2e/specs/approveToken.cy.ts b/packages/arb-token-bridge-ui/tests/e2e/specs/approveToken.cy.ts index a7e14be2aa..d3d90a3861 100644 --- a/packages/arb-token-bridge-ui/tests/e2e/specs/approveToken.cy.ts +++ b/packages/arb-token-bridge-ui/tests/e2e/specs/approveToken.cy.ts @@ -39,7 +39,7 @@ describe('Approve token for deposit', () => { timeout: 50000, interval: 500 }) - cy.startTransfer({ shouldConfirmInMetamask: false }) + cy.clickMoveFundsButton({ shouldConfirmInMetamask: false }) cy.findByText(/pay a one-time approval fee/).click() cy.findByRole('button', { name: /Pay approval fee of/ diff --git a/packages/arb-token-bridge-ui/tests/e2e/specs/batchDeposit.cy.ts b/packages/arb-token-bridge-ui/tests/e2e/specs/batchDeposit.cy.ts index 430e2b5c0f..0850de87f2 100644 --- a/packages/arb-token-bridge-ui/tests/e2e/specs/batchDeposit.cy.ts +++ b/packages/arb-token-bridge-ui/tests/e2e/specs/batchDeposit.cy.ts @@ -131,7 +131,7 @@ describe('Batch Deposit', () => { } context('should deposit successfully', () => { - cy.startTransfer() + cy.clickMoveFundsButton() cy.findTransactionInTransactionHistory({ ...txData, duration: depositTime @@ -238,7 +238,7 @@ describe('Batch Deposit', () => { } context('should deposit successfully', () => { - cy.startTransfer() + cy.clickMoveFundsButton() cy.findTransactionInTransactionHistory({ ...txData, duration: depositTime diff --git a/packages/arb-token-bridge-ui/tests/e2e/specs/depositCctp.cy.ts b/packages/arb-token-bridge-ui/tests/e2e/specs/depositCctp.cy.ts index 40b26f6fd6..ff663af7a0 100644 --- a/packages/arb-token-bridge-ui/tests/e2e/specs/depositCctp.cy.ts +++ b/packages/arb-token-bridge-ui/tests/e2e/specs/depositCctp.cy.ts @@ -86,7 +86,7 @@ describe('Deposit USDC through CCTP', () => { }) it('should initiate depositing USDC to the same address through CCTP successfully', () => { - cy.findMoveFundsButton().click() + cy.clickMoveFundsButton().click() confirmAndApproveCctpDeposit() cy.confirmSpending(USDCAmountToSend.toString()) @@ -122,7 +122,7 @@ describe('Deposit USDC through CCTP', () => { */ it.skip('should initiate depositing USDC to custom destination address through CCTP successfully', () => { cy.fillCustomDestinationAddress() - cy.findMoveFundsButton().click() + cy.clickMoveFundsButton().click() confirmAndApproveCctpDeposit() cy.confirmSpending(USDCAmountToSend.toString()) diff --git a/packages/arb-token-bridge-ui/tests/e2e/specs/depositERC20.cy.ts b/packages/arb-token-bridge-ui/tests/e2e/specs/depositERC20.cy.ts index 4dbc2afc9e..7deaf23462 100644 --- a/packages/arb-token-bridge-ui/tests/e2e/specs/depositERC20.cy.ts +++ b/packages/arb-token-bridge-ui/tests/e2e/specs/depositERC20.cy.ts @@ -89,7 +89,7 @@ describe('Deposit Token', () => { }) context('should deposit successfully', () => { - cy.startTransfer() + cy.clickMoveFundsButton() cy.findTransactionInTransactionHistory({ duration: depositTime, amount: ERC20AmountToSend, @@ -130,7 +130,7 @@ describe('Deposit Token', () => { }) context('should deposit successfully', () => { - cy.startTransfer() + cy.clickMoveFundsButton() const txData = { amount: ERC20AmountToSend, symbol: testCase.symbol diff --git a/packages/arb-token-bridge-ui/tests/e2e/specs/depositNativeToken.cy.ts b/packages/arb-token-bridge-ui/tests/e2e/specs/depositNativeToken.cy.ts index 65c81e0cd1..65afe0f894 100644 --- a/packages/arb-token-bridge-ui/tests/e2e/specs/depositNativeToken.cy.ts +++ b/packages/arb-token-bridge-ui/tests/e2e/specs/depositNativeToken.cy.ts @@ -31,7 +31,7 @@ describe('Deposit native token', () => { cy.findGasFeeSummary(zeroToLessThanOneEth) cy.findGasFeeForChain(getL1NetworkName(), zeroToLessThanOneEth) cy.findGasFeeForChain(getL2NetworkName(), zeroToLessThanOneNativeToken) - cy.startTransfer() + cy.clickMoveFundsButton() cy.findTransactionInTransactionHistory({ duration: depositTime, amount: ETHAmountToDeposit, @@ -53,7 +53,7 @@ describe('Deposit native token', () => { cy.findGasFeeSummary(zeroToLessThanOneEth) cy.findGasFeeForChain(getL1NetworkName(), zeroToLessThanOneEth) cy.findGasFeeForChain(getL2NetworkName(), zeroToLessThanOneNativeToken) - cy.startTransfer() + cy.clickMoveFundsButton() const txData = { amount: ETHAmountToDeposit, diff --git a/packages/arb-token-bridge-ui/tests/e2e/specs/withdrawCctp.cy.ts b/packages/arb-token-bridge-ui/tests/e2e/specs/withdrawCctp.cy.ts index 7c38d25a8b..15591ee460 100644 --- a/packages/arb-token-bridge-ui/tests/e2e/specs/withdrawCctp.cy.ts +++ b/packages/arb-token-bridge-ui/tests/e2e/specs/withdrawCctp.cy.ts @@ -72,7 +72,7 @@ describe('Withdraw USDC through CCTP', () => { 'be.visible' ) cy.findGasFeeForChain(/You'll have to pay Sepolia gas fee upon claiming./i) - cy.findMoveFundsButton().click() + cy.clickMoveFundsButton().click() confirmAndApproveCctpWithdrawal() cy.confirmSpending(USDCAmountToSend.toString()) @@ -109,7 +109,7 @@ describe('Withdraw USDC through CCTP', () => { ) cy.findGasFeeForChain(/You'll have to pay Sepolia gas fee upon claiming./i) cy.fillCustomDestinationAddress() - cy.findMoveFundsButton().click() + cy.clickMoveFundsButton().click() confirmAndApproveCctpWithdrawal() cy.confirmSpending(USDCAmountToSend.toString()) diff --git a/packages/arb-token-bridge-ui/tests/e2e/specs/withdrawERC20.cy.ts b/packages/arb-token-bridge-ui/tests/e2e/specs/withdrawERC20.cy.ts index 418d1d599f..5355a5fa71 100644 --- a/packages/arb-token-bridge-ui/tests/e2e/specs/withdrawERC20.cy.ts +++ b/packages/arb-token-bridge-ui/tests/e2e/specs/withdrawERC20.cy.ts @@ -103,7 +103,7 @@ describe('Withdraw ERC20 Token', () => { }) context('should show clickable withdraw button', () => { - cy.startTransfer({ shouldConfirmInMetamask: false }) + cy.clickMoveFundsButton({ shouldConfirmInMetamask: false }) }) context('should withdraw successfully', () => { @@ -218,7 +218,7 @@ describe('Withdraw ERC20 Token', () => { }) context('should show clickable withdraw button', () => { - cy.startTransfer({ shouldConfirmInMetamask: false }) + cy.clickMoveFundsButton({ shouldConfirmInMetamask: false }) }) context('should initiate withdrawal successfully', () => { diff --git a/packages/arb-token-bridge-ui/tests/e2e/specs/withdrawNativeToken.cy.ts b/packages/arb-token-bridge-ui/tests/e2e/specs/withdrawNativeToken.cy.ts index 75eff3d9f3..21259a3d93 100644 --- a/packages/arb-token-bridge-ui/tests/e2e/specs/withdrawNativeToken.cy.ts +++ b/packages/arb-token-bridge-ui/tests/e2e/specs/withdrawNativeToken.cy.ts @@ -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({ shouldConfirmInMetamask: false }) + cy.clickMoveFundsButton({ shouldConfirmInMetamask: false }) cy.findByText(/Arbitrum’s bridge/i).should('be.visible') // the Continue withdrawal button should be disabled at first @@ -146,7 +146,7 @@ describe('Withdraw native token', () => { cy.typeAmount(ETHToWithdraw) cy.fillCustomDestinationAddress() - cy.startTransfer({ shouldConfirmInMetamask: false }) + cy.clickMoveFundsButton({ shouldConfirmInMetamask: false }) cy.findByText(/Arbitrum’s bridge/i).should('be.visible') // the Continue withdrawal button should be disabled at first diff --git a/packages/arb-token-bridge-ui/tests/support/commands.ts b/packages/arb-token-bridge-ui/tests/support/commands.ts index ae5a6c0706..64f4367fbe 100644 --- a/packages/arb-token-bridge-ui/tests/support/commands.ts +++ b/packages/arb-token-bridge-ui/tests/support/commands.ts @@ -222,7 +222,7 @@ export function findMoveFundsButton(): Cypress.Chainable> { .should('be.visible') } -export function startTransfer({ +export function clickMoveFundsButton({ shouldConfirmInMetamask = true }: { shouldConfirmInMetamask?: boolean @@ -401,7 +401,7 @@ Cypress.Commands.addAll({ findGasFeeForChain, findGasFeeSummary, findMoveFundsButton, - startTransfer, + clickMoveFundsButton, findSelectTokenButton, switchToTransferPanelTab, switchToTransactionHistoryTab,