mirror of
https://github.com/strapi/strapi.git
synced 2025-11-11 07:39:16 +00:00
fix tests
This commit is contained in:
parent
c3265a74d3
commit
285b146389
@ -26,6 +26,20 @@ describe('Folder structure', () => {
|
|||||||
strapi = await createStrapiInstance();
|
strapi = await createStrapiInstance();
|
||||||
rq = await createAuthRequest({ strapi });
|
rq = await createAuthRequest({ strapi });
|
||||||
|
|
||||||
|
// delete all possibly existing folders
|
||||||
|
const res = await rq({
|
||||||
|
method: 'GET',
|
||||||
|
url: '/upload/folders?pagination[pageSize]=100',
|
||||||
|
});
|
||||||
|
|
||||||
|
await rq({
|
||||||
|
method: 'POST',
|
||||||
|
url: '/upload/actions/bulk-delete',
|
||||||
|
body: {
|
||||||
|
folderIds: res.body.results.map(f => f.id),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const rootFolder1 = await createFolder('folder1');
|
const rootFolder1 = await createFolder('folder1');
|
||||||
const rootFolder2 = await createFolder('folder2');
|
const rootFolder2 = await createFolder('folder2');
|
||||||
const nestedFolder1a = await createFolder('folder1A', rootFolder1.id);
|
const nestedFolder1a = await createFolder('folder1A', rootFolder1.id);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user