fix: fix uniswapx feature flag test cleanup (#7615)

This commit is contained in:
Kristie Huang 2023-11-21 14:42:40 -05:00 committed by GitHub
parent 4bec816e6c
commit 4a5a41c59e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,7 +1,6 @@
import { BigNumber } from '@ethersproject/bignumber' import { BigNumber } from '@ethersproject/bignumber'
import { InterfaceSectionName } from '@uniswap/analytics-events' import { InterfaceSectionName } from '@uniswap/analytics-events'
import { CurrencyAmount } from '@uniswap/sdk-core' import { CurrencyAmount } from '@uniswap/sdk-core'
import { FeatureFlag } from 'featureFlags'
import { DEFAULT_DEADLINE_FROM_NOW } from '../../../src/constants/misc' import { DEFAULT_DEADLINE_FROM_NOW } from '../../../src/constants/misc'
import { DAI, USDC_MAINNET } from '../../../src/constants/tokens' import { DAI, USDC_MAINNET } from '../../../src/constants/tokens'
@ -65,9 +64,7 @@ describe('Swap errors', () => {
}) })
it('slippage failure', () => { it('slippage failure', () => {
cy.visit(`/swap?inputCurrency=${USDC_MAINNET.address}&outputCurrency=${DAI.address}`, { cy.visit(`/swap?inputCurrency=${USDC_MAINNET.address}&outputCurrency=${DAI.address}`)
featureFlags: [{ name: FeatureFlag.uniswapXDefaultEnabled, value: false }],
})
cy.hardhat({ automine: false }).then(async (hardhat) => { cy.hardhat({ automine: false }).then(async (hardhat) => {
await hardhat.fund(hardhat.wallet, CurrencyAmount.fromRawAmount(USDC_MAINNET, 500e6)) await hardhat.fund(hardhat.wallet, CurrencyAmount.fromRawAmount(USDC_MAINNET, 500e6))
await hardhat.mine() await hardhat.mine()