Merge pull request #14178 from strapi/fix/list-settings-view-tests

CM: Fix test errors in ListSettingsView
This commit is contained in:
Gustav Hansen 2022-08-29 13:56:04 +02:00 committed by GitHub
commit ecb3643ab5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 823 additions and 969 deletions

View File

@ -121,7 +121,7 @@ describe('ADMIN | CM | LV | Configure the view', () => {
expect(screen.getByText('Configure the view - Michka')).toBeInTheDocument()
);
expect(container.firstChild).toMatchSnapshot();
expect(container).toMatchSnapshot();
});
it('should keep plugins query params when arriving on the page and going back', async () => {
@ -145,7 +145,7 @@ describe('ADMIN | CM | LV | Configure the view', () => {
it('should add field', async () => {
const history = createMemoryHistory();
const { container } = render(makeApp(history), { container: document.body });
const { container } = render(makeApp(history));
await waitFor(() =>
expect(screen.getByText('Configure the view - Michka')).toBeInTheDocument()
@ -180,7 +180,7 @@ describe('ADMIN | CM | LV | Configure the view', () => {
it('should open edit modal', async () => {
const history = createMemoryHistory();
render(makeApp(history), { container: document.body });
render(makeApp(history));
await waitFor(() =>
expect(screen.getByText('Configure the view - Michka')).toBeInTheDocument()
);
@ -195,7 +195,7 @@ describe('ADMIN | CM | LV | Configure the view', () => {
it('should not show sortable toggle input if field not sortable', async () => {
const history = createMemoryHistory();
const { queryByText } = render(makeApp(history), { container: document.body });
const { queryByText } = render(makeApp(history));
await waitFor(() =>
expect(screen.getByText('Configure the view - Michka')).toBeInTheDocument()
);
@ -208,7 +208,7 @@ describe('ADMIN | CM | LV | Configure the view', () => {
it('should show sortable toggle input if field sortable', async () => {
const history = createMemoryHistory();
const { queryByTestId } = render(makeApp(history), { container: document.body });
const { queryByTestId } = render(makeApp(history));
await waitFor(() =>
expect(screen.getByText('Configure the view - Michka')).toBeInTheDocument()
);