Filter ongoing
This commit is contained in:
@@ -1,9 +1,15 @@
|
||||
import { render } from '@testing-library/react';
|
||||
import { fireEvent, render } from '@testing-library/react';
|
||||
|
||||
import { RegularTableHeader } from '../__stories__/TableHeader.stories';
|
||||
|
||||
it('Checks the TableHeader renders', () => {
|
||||
it('Checks the TableHeader renders', async () => {
|
||||
const { getByText } = render(<RegularTableHeader />);
|
||||
|
||||
expect(getByText('Test')).toBeDefined();
|
||||
const sortDropdownButton = getByText('Sort');
|
||||
fireEvent.click(sortDropdownButton);
|
||||
|
||||
const sortByCreatedAt = getByText('Created at');
|
||||
fireEvent.click(sortByCreatedAt);
|
||||
|
||||
expect(getByText('Created at')).toBeDefined();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user