From 56b1234c1c4d7b880171dcd5f988736d8b3df96c Mon Sep 17 00:00:00 2001 From: hongboji <116709317+hongboji@users.noreply.github.com> Date: Mon, 8 Jan 2024 14:05:35 +0800 Subject: [PATCH] fix: workflow e2e concurrency errors (#3345) * fix: workflow e2e concurrency errors * fix: edit Collection event name --- .../src/client/__e2e__/workflowCRUD.test.ts | 3 +++ .../__e2e__/ScheduleEventTrigger/workflowCRUD.test.ts | 6 ++++-- .../__e2e__/collectionEventTrigger/workflowCRUD.test.ts | 3 +++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/plugins/@nocobase/plugin-workflow-form-trigger/src/client/__e2e__/workflowCRUD.test.ts b/packages/plugins/@nocobase/plugin-workflow-form-trigger/src/client/__e2e__/workflowCRUD.test.ts index 2898575ca..1a3baa8d0 100644 --- a/packages/plugins/@nocobase/plugin-workflow-form-trigger/src/client/__e2e__/workflowCRUD.test.ts +++ b/packages/plugins/@nocobase/plugin-workflow-form-trigger/src/client/__e2e__/workflowCRUD.test.ts @@ -162,6 +162,9 @@ test.describe('Duplicate', () => { await page.getByLabel(`action-Action-Submit-workflows-${workFlowName}`).click(); await page.waitForLoadState('networkidle'); // 3、预期结果:列表中出现筛选的工作流 + await page.getByLabel('action-Filter.Action-Filter-filter-workflows').click(); + await page.getByRole('textbox').fill(workFlowName); + await page.getByRole('button', { name: 'Submit', exact: true }).click(); await expect(page.getByText(`${workFlowName} copy`)).toBeAttached(); // 4、后置处理:删除工作流 diff --git a/packages/plugins/@nocobase/plugin-workflow/src/client/__e2e__/ScheduleEventTrigger/workflowCRUD.test.ts b/packages/plugins/@nocobase/plugin-workflow/src/client/__e2e__/ScheduleEventTrigger/workflowCRUD.test.ts index 7fc25b49d..c7384084b 100644 --- a/packages/plugins/@nocobase/plugin-workflow/src/client/__e2e__/ScheduleEventTrigger/workflowCRUD.test.ts +++ b/packages/plugins/@nocobase/plugin-workflow/src/client/__e2e__/ScheduleEventTrigger/workflowCRUD.test.ts @@ -147,9 +147,11 @@ test.describe('Duplicate', () => { await page.waitForLoadState('networkidle'); await page.getByLabel(`action-Action.Link-Duplicate-workflows-${workFlowName}`).click(); await page.getByLabel(`action-Action-Submit-workflows-${workFlowName}`).click(); - + await page.waitForLoadState('networkidle'); // 3、预期结果:列表中出现筛选的工作流 - await page.reload(); + await page.getByLabel('action-Filter.Action-Filter-filter-workflows').click(); + await page.getByRole('textbox').fill(workFlowName); + await page.getByRole('button', { name: 'Submit', exact: true }).click(); await expect(page.getByText(`${workFlowName} copy`)).toBeAttached(); // 4、后置处理:删除工作流 diff --git a/packages/plugins/@nocobase/plugin-workflow/src/client/__e2e__/collectionEventTrigger/workflowCRUD.test.ts b/packages/plugins/@nocobase/plugin-workflow/src/client/__e2e__/collectionEventTrigger/workflowCRUD.test.ts index 4f70b8680..4b31a33e0 100644 --- a/packages/plugins/@nocobase/plugin-workflow/src/client/__e2e__/collectionEventTrigger/workflowCRUD.test.ts +++ b/packages/plugins/@nocobase/plugin-workflow/src/client/__e2e__/collectionEventTrigger/workflowCRUD.test.ts @@ -161,6 +161,9 @@ test.describe('Duplicate', () => { await page.getByLabel(`action-Action-Submit-workflows-${workFlowName}`).click(); // 3、预期结果:列表中出现筛选的工作流 + await page.getByLabel('action-Filter.Action-Filter-filter-workflows').click(); + await page.getByRole('textbox').fill(workFlowName); + await page.getByRole('button', { name: 'Submit' }).click(); await expect(page.getByText(`${workFlowName} copy`)).toBeAttached(); // 4、后置处理:删除工作流