From 826889715bd021f561641c7714460af5f2561cfc Mon Sep 17 00:00:00 2001 From: Baptiste Devessier Date: Fri, 18 Apr 2025 18:39:43 +0200 Subject: [PATCH] Fix e2e tests (#11656) After @bosiraphael's updates on the table, cells are duplicated when they get the hover/focus. Playwright has a hard time finding which element to click on. I dislike my solution because it doesn't mimic how a real user would use the application, but I couldn't find a better solution that wasn't flaky. --- packages/twenty-e2e-testing/lib/fixtures/blank-workflow.ts | 2 +- .../twenty-e2e-testing/tests/workflow-use-as-draft.spec.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/twenty-e2e-testing/lib/fixtures/blank-workflow.ts b/packages/twenty-e2e-testing/lib/fixtures/blank-workflow.ts index afae974ce..d02e03931 100644 --- a/packages/twenty-e2e-testing/lib/fixtures/blank-workflow.ts +++ b/packages/twenty-e2e-testing/lib/fixtures/blank-workflow.ts @@ -118,7 +118,7 @@ export class WorkflowVisualizerPage { .getByTestId(`row-id-${this.workflowId}`) .getByRole('link', { name: this.workflowName }); - await workflowLink.click(); + await workflowLink.click({ force: true }); await this.waitForWorkflowVisualizerLoad(); } diff --git a/packages/twenty-e2e-testing/tests/workflow-use-as-draft.spec.ts b/packages/twenty-e2e-testing/tests/workflow-use-as-draft.spec.ts index 307e76c01..78b31f5dd 100644 --- a/packages/twenty-e2e-testing/tests/workflow-use-as-draft.spec.ts +++ b/packages/twenty-e2e-testing/tests/workflow-use-as-draft.spec.ts @@ -57,7 +57,7 @@ test('Use an old version as draft', async ({ workflowVisualizer, page }) => { }, ); - await linkToFirstWorkflowVersion.click(); + await linkToFirstWorkflowVersion.click({ force: true }); await expect(workflowVisualizer.workflowStatus).toHaveText('Archived'); await expect(workflowVisualizer.useAsDraftButton).toBeVisible(); @@ -139,7 +139,7 @@ test('Use an old version as draft while having a pending draft version', async ( }, ); - await linkToFirstWorkflowVersion.click(); + await linkToFirstWorkflowVersion.click({ force: true }); await expect(workflowVisualizer.workflowStatus).toHaveText('Active'); await expect(workflowVisualizer.useAsDraftButton).toBeVisible();