b89ee36448
* test(e2e): improve memory mgmt * test(e2e): record flakes * test(e2e): simplify tests in attempt to de-flake * test(e2e): more simplification * test(e2e): disable transaction popup checks * test(e2e): better wrap assertions * test(e2e): always assert both inputs
14 lines
472 B
TypeScript
14 lines
472 B
TypeScript
import { Currency } from '@uniswap/sdk-core'
|
|
|
|
export const getTestSelector = (selectorId: string) => `[data-testid=${selectorId}]`
|
|
|
|
export const getTestSelectorStartsWith = (selectorId: string) => `[data-testid^=${selectorId}]`
|
|
|
|
/** Gets the balance of a token as a Chainable. */
|
|
export function getBalance(token: Currency) {
|
|
return cy
|
|
.hardhat()
|
|
.then((hardhat) => hardhat.getBalance(hardhat.wallet, token))
|
|
.then((balance) => Number(balance.toFixed(1)))
|
|
}
|