mirror of
https://github.com/strapi/strapi.git
synced 2025-11-19 19:50:46 +00:00
test(review-workflow): refresh data between tests
This commit is contained in:
parent
e1b1c1322f
commit
e72ca4b13c
@ -119,6 +119,14 @@ describeOnCondition(edition === 'EE')('Review workflows', () => {
|
|||||||
stages: [defaultStage.id, secondStage.id],
|
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, {
|
await updateContentType(productUID, {
|
||||||
components: [],
|
components: [],
|
||||||
contentType: model,
|
contentType: model,
|
||||||
@ -474,10 +482,12 @@ describeOnCondition(edition === 'EE')('Review workflows', () => {
|
|||||||
describe('Review Workflow is enabled', () => {
|
describe('Review Workflow is enabled', () => {
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
// Update workflow to unassign content type
|
// Update workflow to unassign content type
|
||||||
await requests.admin.put(
|
const workflow = await requests.admin.put(
|
||||||
`/admin/review-workflows/workflows/${testWorkflow.id}?populate=*`,
|
`/admin/review-workflows/workflows/${testWorkflow.id}?populate=*`,
|
||||||
{ body: { data: { contentTypes: [productUID] } } }
|
{ body: { data: { contentTypes: [productUID] } } }
|
||||||
);
|
);
|
||||||
|
|
||||||
|
console.log(workflow);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('Should update the accordingly on an entity', async () => {
|
test('Should update the accordingly on an entity', async () => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user