Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: add timeout to tx history e2e #2143

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ describe('Batch Deposit', () => {
})

cy.findTransactionInTransactionHistory({
duration: 'a few seconds ago',
duration: /a (few seconds|minute) ago/,
...txData
})
cy.switchToTransferPanelTab()
Expand Down Expand Up @@ -258,7 +258,7 @@ describe('Batch Deposit', () => {
})

cy.findTransactionInTransactionHistory({
duration: 'a few seconds ago',
duration: /a (few seconds|minute) ago/,
...txData
})
cy.openTransactionDetails(txData)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ describe('Deposit Token', () => {
cy.waitUntil(
() =>
cy.findTransactionInTransactionHistory({
duration: 'a few seconds ago',
duration: /a (few seconds|minute) ago/,
amount: ERC20AmountToSend,
symbol: testCase.symbol
}),
Expand All @@ -170,7 +170,7 @@ describe('Deposit Token', () => {
symbol: testCase.symbol
}
cy.findTransactionInTransactionHistory({
duration: 'a few seconds ago',
duration: /a (few seconds|minute) ago/,
...txData
})
cy.openTransactionDetails(txData)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ describe('Withdraw ERC20 Token', () => {
})
})

it('should claim funds', { defaultCommandTimeout: 200_000 }, () => {
it('should claim funds', { defaultCommandTimeout: 300_000 }, () => {
// increase the timeout for this test as claim button can take ~(20 blocks *10 blocks/sec) to activate

cy.login({ networkType: 'parentChain' }) // login to L1 to claim the funds (otherwise would need to change network after clicking on claim)
Expand Down
4 changes: 2 additions & 2 deletions packages/arb-token-bridge-ui/tests/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ export function findTransactionInTransactionHistory({
symbol2?: string
amount: number
amount2?: number
duration?: string
duration?: string | RegExp
}) {
// Replace . with \.
const parsedAmount = amount.toString().replace(/\./g, '\\.')
Expand All @@ -313,7 +313,7 @@ export function findTransactionInTransactionHistory({
}`
)

cy.findByTestId(rowId).as('row')
cy.findByTestId(rowId, { timeout: 120_000 }).as('row')
if (duration) {
cy.get('@row').findAllByText(duration).first().should('be.visible')
}
Expand Down
Loading