Skip to content

Commit

Permalink
Add test for imputToken to check does not show error for valid address
Browse files Browse the repository at this point in the history
  • Loading branch information
ninokeldishvili committed Dec 27, 2024
1 parent 54d9181 commit 56b0320
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/ui-components/src/__tests__/InputToken.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,15 @@ describe('InputToken', () => {

expect(getByText('Invalid Address')).toBeInTheDocument();
});

it('does not show error for valid address', async () => {
const address = '';
const decimals = 0;
const { getByTestId, queryByText } = render(InputToken, { props: { address, decimals } });

const addressInput = getByTestId('token-address').querySelector('input') as HTMLInputElement;
await fireEvent.input(addressInput, { target: { value: '0xc0D477556c25C9d67E1f57245C7453DA776B51cf' } });

expect(queryByText('Invalid Address')).toBeNull();
});
});

0 comments on commit 56b0320

Please sign in to comment.