Skip to content

Commit

Permalink
fix e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
brtkx committed Jan 22, 2025
1 parent bbb3800 commit ce9f123
Showing 1 changed file with 33 additions and 32 deletions.
65 changes: 33 additions & 32 deletions packages/arb-token-bridge-ui/tests/e2e/specs/urlQueryParam.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import { formatAmount } from '../../../src/util/NumberUtils'
import {
getInitialETHBalance,
getL1NetworkName,
getL2NetworkName,
getL1NetworkConfig,
getL2NetworkConfig,
visitAfterSomeDelay
} from '../../support/common'

Expand All @@ -31,8 +31,8 @@ describe('User enters site with query params on URL', () => {
visitAfterSomeDelay('/', {
qs: {
amount: 'max',
sourceChain: getL1NetworkName(),
destinationChain: getL2NetworkName()
sourceChain: getL1NetworkConfig().networkName,
destinationChain: getL2NetworkConfig().networkName
}
})

Expand Down Expand Up @@ -60,8 +60,8 @@ describe('User enters site with query params on URL', () => {
visitAfterSomeDelay('/', {
qs: {
amount: 'MAX',
sourceChain: getL1NetworkName(),
destinationChain: getL2NetworkName()
sourceChain: getL1NetworkConfig().networkName,
destinationChain: getL2NetworkConfig().networkName
}
})

Expand Down Expand Up @@ -93,8 +93,8 @@ describe('User enters site with query params on URL', () => {
visitAfterSomeDelay('/', {
qs: {
amount: 'MaX',
sourceChain: getL1NetworkName(),
destinationChain: getL2NetworkName()
sourceChain: getL1NetworkConfig().networkName,
destinationChain: getL2NetworkConfig().networkName
}
})

Expand Down Expand Up @@ -129,8 +129,8 @@ describe('User enters site with query params on URL', () => {
visitAfterSomeDelay('/', {
qs: {
amount: '56',
sourceChain: getL1NetworkName(),
destinationChain: getL2NetworkName()
sourceChain: getL1NetworkConfig().networkName,
destinationChain: getL2NetworkConfig().networkName
}
})

Expand All @@ -140,8 +140,8 @@ describe('User enters site with query params on URL', () => {
visitAfterSomeDelay('/', {
qs: {
amount: '1.6678',
sourceChain: getL1NetworkName(),
destinationChain: getL2NetworkName()
sourceChain: getL1NetworkConfig().networkName,
destinationChain: getL2NetworkConfig().networkName
}
})

Expand All @@ -151,8 +151,8 @@ describe('User enters site with query params on URL', () => {
visitAfterSomeDelay('/', {
qs: {
amount: '6',
sourceChain: getL1NetworkName(),
destinationChain: getL2NetworkName()
sourceChain: getL1NetworkConfig().networkName,
destinationChain: getL2NetworkConfig().networkName
}
})

Expand All @@ -162,8 +162,8 @@ describe('User enters site with query params on URL', () => {
visitAfterSomeDelay('/', {
qs: {
amount: '0.123',
sourceChain: getL1NetworkName(),
destinationChain: getL2NetworkName()
sourceChain: getL1NetworkConfig().networkName,
destinationChain: getL2NetworkConfig().networkName
}
})

Expand All @@ -174,8 +174,8 @@ describe('User enters site with query params on URL', () => {
visitAfterSomeDelay('/', {
qs: {
amount: '-0.123',
sourceChain: getL1NetworkName(),
destinationChain: getL2NetworkName()
sourceChain: getL1NetworkConfig().networkName,
destinationChain: getL2NetworkConfig().networkName
}
})

Expand All @@ -185,8 +185,8 @@ describe('User enters site with query params on URL', () => {
visitAfterSomeDelay('/', {
qs: {
amount: 'asdfs',
sourceChain: getL1NetworkName(),
destinationChain: getL2NetworkName()
sourceChain: getL1NetworkConfig().networkName,
destinationChain: getL2NetworkConfig().networkName
}
})

Expand All @@ -196,8 +196,8 @@ describe('User enters site with query params on URL', () => {
visitAfterSomeDelay('/', {
qs: {
amount: '0',
sourceChain: getL1NetworkName(),
destinationChain: getL2NetworkName()
sourceChain: getL1NetworkConfig().networkName,
destinationChain: getL2NetworkConfig().networkName
}
})

Expand All @@ -207,8 +207,8 @@ describe('User enters site with query params on URL', () => {
visitAfterSomeDelay('/', {
qs: {
amount: '0.0001',
sourceChain: getL1NetworkName(),
destinationChain: getL2NetworkName()
sourceChain: getL1NetworkConfig().networkName,
destinationChain: getL2NetworkConfig().networkName
}
})

Expand All @@ -218,8 +218,8 @@ describe('User enters site with query params on URL', () => {
visitAfterSomeDelay('/', {
qs: {
amount: '123,3,43',
sourceChain: getL1NetworkName(),
destinationChain: getL2NetworkName()
sourceChain: getL1NetworkConfig().networkName,
destinationChain: getL2NetworkConfig().networkName
}
})

Expand All @@ -231,8 +231,8 @@ describe('User enters site with query params on URL', () => {
visitAfterSomeDelay('/', {
qs: {
amount: '0, 123.222, 0.3',
sourceChain: getL1NetworkName(),
destinationChain: getL2NetworkName()
sourceChain: getL1NetworkConfig().networkName,
destinationChain: getL2NetworkConfig().networkName
}
})

Expand All @@ -242,13 +242,14 @@ describe('User enters site with query params on URL', () => {
context('should select token using query params', () => {
visitAfterSomeDelay('/', {
qs: {
sourceChain: getL1NetworkName(),
destinationChain: getL2NetworkName(),
token: Cypress.env('ERC20_TOKEN_ADDRESS_PARENT_CHAIN')
sourceChain: 'sepolia',
destinationChain: 'arbitrum-sepolia',
// Arbitrum token on Sepolia
token: '0xfa898e8d38b008f3bac64dce019a9480d4f06863'
}
})

cy.findSelectTokenButton(Cypress.env('IARB'))
cy.findSelectTokenButton('ARB')
})
})
})
Expand Down

0 comments on commit ce9f123

Please sign in to comment.