mirror of
https://github.com/strapi/strapi.git
synced 2025-08-07 08:16:35 +00:00
Chore: Update tests
This commit is contained in:
parent
1baeabf6f6
commit
de1b02bfce
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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' },
|
||||
});
|
||||
});
|
||||
|
@ -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({
|
||||
|
@ -35,6 +35,7 @@ exports[`<MediaLibraryInput /> renders and matches the snapshot 1`] = `
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
height: 124px;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user