mirror of
https://github.com/strapi/strapi.git
synced 2025-08-10 17:58:07 +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: -webkit-flex;
|
||||||
display: -ms-flexbox;
|
display: -ms-flexbox;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
height: 124px;
|
height: 124px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1001,6 +1002,7 @@ exports[`ApplicationsInfosPage || LogoInput from url should render upload modal
|
|||||||
display: -webkit-flex;
|
display: -webkit-flex;
|
||||||
display: -ms-flexbox;
|
display: -ms-flexbox;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
height: 124px;
|
height: 124px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1920,6 +1922,7 @@ exports[`ApplicationsInfosPage || LogoInput logo input should match snapshot 1`]
|
|||||||
display: -webkit-flex;
|
display: -webkit-flex;
|
||||||
display: -ms-flexbox;
|
display: -ms-flexbox;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
height: 124px;
|
height: 124px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ describe('EE | Content Manager | EditView | InformationBox', () => {
|
|||||||
layout: { uid: 'api::articles:articles' },
|
layout: { uid: 'api::articles:articles' },
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(useReviewWorkflows).toHaveBeenCalledWith(undefined, {
|
expect(useReviewWorkflows).toHaveBeenCalledWith({
|
||||||
filters: { contentTypes: 'api::articles:articles' },
|
filters: { contentTypes: 'api::articles:articles' },
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -4,7 +4,6 @@ import { renderHook } from '@testing-library/react-hooks';
|
|||||||
import { IntlProvider } from 'react-intl';
|
import { IntlProvider } from 'react-intl';
|
||||||
import { setupServer } from 'msw/node';
|
import { setupServer } from 'msw/node';
|
||||||
import { rest } from 'msw';
|
import { rest } from 'msw';
|
||||||
import { useFetchClient } from '@strapi/helper-plugin';
|
|
||||||
|
|
||||||
import { useReviewWorkflows } from '../useReviewWorkflows';
|
import { useReviewWorkflows } from '../useReviewWorkflows';
|
||||||
|
|
||||||
@ -73,14 +72,11 @@ describe('useReviewWorkflows', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('fetch all workflows when calling the hook without a workflow id', async () => {
|
test('fetch all workflows when calling the hook without a workflow id', async () => {
|
||||||
const { get } = useFetchClient();
|
|
||||||
const { result, waitFor } = setup();
|
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));
|
await waitFor(() => expect(result.current.isLoading).toBe(false));
|
||||||
|
|
||||||
expect(get).toBeCalledWith('/admin/review-workflows/workflows/?populate=stages&sort=name:asc');
|
|
||||||
|
|
||||||
expect(result.current).toStrictEqual(
|
expect(result.current).toStrictEqual(
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
|
@ -35,6 +35,7 @@ exports[`<MediaLibraryInput /> renders and matches the snapshot 1`] = `
|
|||||||
display: -webkit-flex;
|
display: -webkit-flex;
|
||||||
display: -ms-flexbox;
|
display: -ms-flexbox;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
height: 124px;
|
height: 124px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user