Skip to content

Commit

Permalink
fix: fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
sahar-fehri committed Nov 21, 2024
2 parents c8e2452 + a04b34b commit e130366
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { fireEvent } from '@testing-library/react';
import { fireEvent, waitFor } from '@testing-library/react';
import configureMockStore from 'redux-mock-store';
import thunk from 'redux-thunk';
import { renderWithProvider } from '../../../../../test/lib/render-helpers';
Expand Down Expand Up @@ -55,7 +55,7 @@ describe('AddContact component', () => {
expect(getByText('Ethereum public address')).toBeInTheDocument();
});

it('should validate the address correctly', () => {
it('should validate the address correctly', async () => {
const store = configureMockStore(middleware)(state);
const { getByText, getByTestId } = renderWithProvider(
<AddContact {...props} />,
Expand All @@ -64,9 +64,10 @@ describe('AddContact component', () => {

const input = getByTestId('ens-input');
fireEvent.change(input, { target: { value: 'invalid address' } });
setTimeout(() => {
expect(getByText('Recipient address is invalid')).toBeInTheDocument();
}, 600);

await waitFor(() =>
expect(getByText('Recipient address is invalid')).toBeInTheDocument(),
);
});

it('should get disabled submit button when username field is empty', () => {
Expand Down

0 comments on commit e130366

Please sign in to comment.