test: wait for rows to be displayed
This commit is contained in:
@ -1,10 +1,12 @@
|
||||
import { render } from '@testing-library/react';
|
||||
import { render, waitFor } from '@testing-library/react';
|
||||
|
||||
import { PeopleDefault } from '../__stories__/People.stories';
|
||||
|
||||
it('Checks the People page render', () => {
|
||||
it('Checks the People page render', async () => {
|
||||
const { getByTestId } = render(<PeopleDefault />);
|
||||
|
||||
const title = getByTestId('top-bar-title');
|
||||
expect(title).toHaveTextContent('People');
|
||||
await waitFor(() => {
|
||||
const personChip = getByTestId('row-id-0');
|
||||
expect(personChip).toBeDefined();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user