Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes 1974: Added manual snapshot #186

Merged
merged 14 commits into from
Jan 18, 2024
9 changes: 7 additions & 2 deletions src/Pages/ContentListTable/ContentListTable.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
defaultSnapshotItem,
testRepositoryParamsResponse,
} from '../../testingHelpers';
import { render, waitFor } from '@testing-library/react';
import { render, waitFor, screen, fireEvent } from '@testing-library/react';
import ContentListTable from './ContentListTable';
import { useContentListQuery, useRepositoryParams } from '../../services/Content/ContentQueries';
import AddContent from './components/AddContent/AddContent';
Expand Down Expand Up @@ -89,7 +89,8 @@ it('Render with a single row', () => {
meta: { count: 1, limit: 20, offset: 0 },
},
}));

});
test('should trigger snapshot when kebab is clicked', async () => {
Andrewgdewar marked this conversation as resolved.
Show resolved Hide resolved
const { queryByText } = render(
<ReactQueryTestWrapper>
<ContentListTable />
Expand Down Expand Up @@ -121,6 +122,10 @@ it('Render with a single row', () => {
),
).toBeInTheDocument(),
);
waitFor(() => {
const kebabButton = screen.getByRole('kebab', { name: 'kebabButton' });
fireEvent.click(kebabButton);
});
});

it('Render with a single redhat repository', () => {
Expand Down
Loading