Skip to content

Commit

Permalink
test(debug): debug gitHub problem
Browse files Browse the repository at this point in the history
  • Loading branch information
envin3 committed Feb 19, 2024
1 parent 49795e3 commit f772e0e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/pages/swap/__test__/Swap.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ describe('Swap', async () => {
vi.spyOn(feeUtils, 'getSwapFees').mockResolvedValue({ basisPoints: 15, networkFee: 1e18, minProtocolFee: 2e18 })
swapAssets.find((_el) => _el.id === TLOS_ON_BSC_MAINNET).balance = BigNumber(200)
swapAssets.find((_el) => _el.id === TLOS_ON_ETH_MAINNET).balance = BigNumber(0)
console.log('Step1')
render(
<Wrapper
asset="tlos"
Expand All @@ -252,13 +253,15 @@ describe('Swap', async () => {
/>
)
await waitFor(() => expect(screen.getByText(/Enter an amount/)).toBeInTheDocument())
console.log('Step2')
const [fromInput, toInput, addressInput] = screen.getAllByRole('textbox')
const [, , swapButton] = screen.getAllByRole('button')
await UserEvent.type(fromInput, '200')
await UserEvent.type(addressInput, '0xA8Ae3c4cF1c92ADFf13e33b35280fc59b6600cA3')
expect(swapButton).toHaveTextContent('Swap')
await UserEvent.click(swapButton)
const [, , , , acceptTerms] = screen.getAllByRole('button')
console.log('screen', acceptTerms)
await UserEvent.click(acceptTerms)
expect(swapSpy).toHaveBeenCalledWith(
expect.objectContaining({ id: 'TLOS_ON_BSC_MAINNET' }),
Expand Down

0 comments on commit f772e0e

Please sign in to comment.