From e72ca4b13c88af09dfade3a5f030a3e4e6b1799f Mon Sep 17 00:00:00 2001 From: nathan-pichon Date: Fri, 23 Jun 2023 14:26:49 +0200 Subject: [PATCH] test(review-workflow): refresh data between tests --- api-tests/core/admin/ee/review-workflows.test.api.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/api-tests/core/admin/ee/review-workflows.test.api.js b/api-tests/core/admin/ee/review-workflows.test.api.js index 6ea39a6240..0a1ed1798b 100644 --- a/api-tests/core/admin/ee/review-workflows.test.api.js +++ b/api-tests/core/admin/ee/review-workflows.test.api.js @@ -119,6 +119,14 @@ describeOnCondition(edition === 'EE')('Review workflows', () => { stages: [defaultStage.id, secondStage.id], }, }); + defaultStage = await strapi.query(STAGE_MODEL_UID).update({ + where: { id: defaultStage.id }, + data: { name: 'Stage' }, + }); + secondStage = await strapi.query(STAGE_MODEL_UID).update({ + where: { id: secondStage.id }, + data: { name: 'Stage 2' }, + }); await updateContentType(productUID, { components: [], contentType: model, @@ -474,10 +482,12 @@ describeOnCondition(edition === 'EE')('Review workflows', () => { describe('Review Workflow is enabled', () => { beforeAll(async () => { // Update workflow to unassign content type - await requests.admin.put( + const workflow = await requests.admin.put( `/admin/review-workflows/workflows/${testWorkflow.id}?populate=*`, { body: { data: { contentTypes: [productUID] } } } ); + + console.log(workflow); }); test('Should update the accordingly on an entity', async () => {