Chore: Update tests

This commit is contained in:
Gustav Hansen 2023-06-02 11:51:30 +02:00
parent 1baeabf6f6
commit de1b02bfce
4 changed files with 7 additions and 7 deletions

View File

@ -26,6 +26,7 @@ exports[`ApplicationsInfosPage || LogoInput from computer should render upload m
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
width: 100%;
height: 124px;
}
@ -1001,6 +1002,7 @@ exports[`ApplicationsInfosPage || LogoInput from url should render upload modal
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
width: 100%;
height: 124px;
}
@ -1920,6 +1922,7 @@ exports[`ApplicationsInfosPage || LogoInput logo input should match snapshot 1`]
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
width: 100%;
height: 124px;
}

View File

@ -100,7 +100,7 @@ describe('EE | Content Manager | EditView | InformationBox', () => {
layout: { uid: 'api::articles:articles' },
});
expect(useReviewWorkflows).toHaveBeenCalledWith(undefined, {
expect(useReviewWorkflows).toHaveBeenCalledWith({
filters: { contentTypes: 'api::articles:articles' },
});
});

View File

@ -4,7 +4,6 @@ import { renderHook } from '@testing-library/react-hooks';
import { IntlProvider } from 'react-intl';
import { setupServer } from 'msw/node';
import { rest } from 'msw';
import { useFetchClient } from '@strapi/helper-plugin';
import { useReviewWorkflows } from '../useReviewWorkflows';
@ -73,14 +72,11 @@ describe('useReviewWorkflows', () => {
});
test('fetch all workflows when calling the hook without a workflow id', async () => {
const { get } = useFetchClient();
const { result, waitFor } = setup();
expect(result.current.workflows.isLoading).toBe(true);
expect(result.current.isLoading).toBe(true);
await waitFor(() => expect(result.current.workflows.isLoading).toBe(false));
expect(get).toBeCalledWith('/admin/review-workflows/workflows/?populate=stages&sort=name:asc');
await waitFor(() => expect(result.current.isLoading).toBe(false));
expect(result.current).toStrictEqual(
expect.objectContaining({

View File

@ -35,6 +35,7 @@ exports[`<MediaLibraryInput /> renders and matches the snapshot 1`] = `
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
width: 100%;
height: 124px;
}