Skip to content

Commit

Permalink
fix: earn e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewlilley committed Jun 23, 2023
1 parent 2b092e7 commit b5e0b2a
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import { TransactionRequest } from '@ethersproject/providers'
import { Percent } from '@sushiswap/math'
import { _useSendTransaction as useSendTransaction } from '@sushiswap/wagmi'
import {
_useSendTransaction as useSendTransaction,
useNetwork,
useAccount,
UserRejectedRequestError,
} from '@sushiswap/wagmi'
import { Dispatch, FC, ReactNode, SetStateAction, useCallback, useMemo, useState } from 'react'
import { useAccount, UserRejectedRequestError } from '@sushiswap/wagmi'
import { SendTransactionResult } from '@sushiswap/wagmi/actions'
import { createToast } from '@sushiswap/ui/future/components/toast'
import { isSushiSwapV3ChainId, NonfungiblePositionManager, Position } from '@sushiswap/v3-sdk'
Expand All @@ -16,7 +20,7 @@ import { useConcentratedDerivedMintInfo } from '../ConcentratedLiquidityProvider
import { ChainId } from '@sushiswap/chain'
import { Type } from '@sushiswap/currency'
import { getV3NonFungiblePositionManagerConractConfig } from '@sushiswap/wagmi/future/hooks/contracts/useV3NonFungiblePositionManager'
import { useNetwork } from '@sushiswap/wagmi'

interface AddSectionConfirmModalConcentratedProps
extends Pick<ReturnType<typeof useConcentratedDerivedMintInfo>, 'noLiquidity' | 'position'> {
closeReview(): void
Expand Down
6 changes: 3 additions & 3 deletions apps/earn/components/ConcentratedLiquidityWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export const ConcentratedLiquidityWidget: FC<ConcentratedLiquidityWidget> = ({
</div>
</Transition>
<Web3Input.Currency
id='add-liquidity-token0'
id="add-liquidity-token0"
type="INPUT"
className="p-3 bg-white dark:bg-slate-800 rounded-xl"
chainId={chainId}
Expand Down Expand Up @@ -216,7 +216,7 @@ export const ConcentratedLiquidityWidget: FC<ConcentratedLiquidityWidget> = ({
</div>
</Transition>
<Web3Input.Currency
id='add-liquidity-token1'
id="add-liquidity-token1"
type="INPUT"
className="p-3 bg-white dark:bg-slate-800 rounded-xl"
chainId={chainId}
Expand Down Expand Up @@ -265,7 +265,7 @@ export const ConcentratedLiquidityWidget: FC<ConcentratedLiquidityWidget> = ({
successLink={successLink}
>
{({ setOpen }) => (
<Button fullWidth onClick={() => setOpen(true)} size="xl" testId='add-liquidity-preview'>
<Button fullWidth onClick={() => setOpen(true)} size="xl" testId="add-liquidity-preview">
Preview
</Button>
)}
Expand Down
4 changes: 3 additions & 1 deletion apps/furo/test/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,9 @@ export async function createMultipleVests(page: Page, chainId: number, vestingAr
await expect(confirmCreateVestingButton).toBeEnabled()
await confirmCreateVestingButton.click()

await expect(page.locator('div', { hasText: `Creating ${vestingArgs.length} vests` }).last()).toContainText(`Creating ${vestingArgs.length} vests`)
await expect(page.locator('div', { hasText: `Creating ${vestingArgs.length} vests` }).last()).toContainText(
`Creating ${vestingArgs.length} vests`
)
}

async function handleGeneralDetails(page: Page, args: VestingArgs, index = 0) {
Expand Down
1 change: 1 addition & 0 deletions packages/ui/src/future/components/input/Text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ function Component(
autoCapitalize="off"
spellCheck="false"
autoComplete="off"
testdata-id={id}
/>
<label
htmlFor={id}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ export const useConcentratedPositionOwner = ({
functionName: 'ownerOf',
args: [BigNumber.from(tokenId ? tokenId : 0)],
enabled: Boolean(chainId) && Boolean(tokenId),
})
} as const)
}

0 comments on commit b5e0b2a

Please sign in to comment.