diff --git a/desktop/tests/e2e/workflow-local-controls.spec.ts b/desktop/tests/e2e/workflow-local-controls.spec.ts index 6a8319082c..97f70051c9 100644 --- a/desktop/tests/e2e/workflow-local-controls.spec.ts +++ b/desktop/tests/e2e/workflow-local-controls.spec.ts @@ -63,7 +63,12 @@ async function addMessageStep( ) { await dialog.getByRole("button", { name: "Add step", exact: true }).click(); await page.getByRole("menuitem", { name: "Send Message" }).click(); - await dialog.getByLabel("Message text").fill("Workflow notification"); + // The outgoing trigger inspector also labels its input "Message text". + const stepText = dialog + .getByLabel("Message text", { exact: true }) + .and(dialog.locator("#wf-step-0-text")); + await stepText.fill("Workflow notification"); + await expect(stepText).toHaveValue("Workflow notification"); } async function createEnabled( @@ -288,6 +293,7 @@ test("round-trips and reopens structured message-text conditions", async ({ await openTriggerInspector(dialog); const matchControls = dialog.getByRole("group", { name: "Match" }); const operatorButtons = matchControls.getByRole("button"); + await waitForAnimations(page); const firstOperatorBox = await operatorButtons.nth(0).boundingBox(); const secondOperatorBox = await operatorButtons.nth(1).boundingBox(); const thirdOperatorBox = await operatorButtons.nth(2).boundingBox(); @@ -299,7 +305,6 @@ test("round-trips and reopens structured message-text conditions", async ({ Math.abs((secondOperatorBox?.y ?? 0) - (firstOperatorBox?.y ?? 0)), ).toBeLessThan(1); expect(thirdOperatorBox?.y).toBeGreaterThan(firstOperatorBox?.y ?? 0); - await waitForAnimations(page); await matchControls.screenshot({ path: "test-results/workflow-message-condition-operators.png", }); diff --git a/desktop/tests/e2e/workflows.spec.ts b/desktop/tests/e2e/workflows.spec.ts index 16844a2f3e..38e95034f0 100644 --- a/desktop/tests/e2e/workflows.spec.ts +++ b/desktop/tests/e2e/workflows.spec.ts @@ -96,7 +96,11 @@ async function createWorkflow( await dialog.getByRole("button", { name: "Add step", exact: true }).click(); await page.getByRole("menuitem", { name: "Send Message" }).click(); - await dialog.getByLabel("Message text").fill("Workflow notification"); + const messageText = dialog + .getByLabel("Message text") + .and(dialog.locator("#wf-step-0-text")); + await messageText.fill("Workflow notification"); + await expect(messageText).toHaveValue("Workflow notification"); if (options?.stepName) { await dialog.getByRole("button", { name: "Step details" }).click(); await dialog.getByLabel("Name (optional)").fill(options.stepName); @@ -700,7 +704,11 @@ test("captures the built editor at desktop and narrow widths", async ({ await editWorkflowName(dialog, "editor_screenshot"); await dialog.getByRole("button", { name: "Add step", exact: true }).click(); await page.getByRole("menuitem", { name: "Send Message" }).click(); - await dialog.getByLabel("Message text").fill("Notify the workflow channel"); + const messageText = dialog + .getByLabel("Message text") + .and(dialog.locator("#wf-step-0-text")); + await messageText.fill("Notify the workflow channel"); + await expect(messageText).toHaveValue("Notify the workflow channel"); const inspector = dialog.getByTestId("workflow-node-inspector"); for (const viewport of [ @@ -805,7 +813,11 @@ test("pane routes use stable IDs and Form/YAML changes stay synchronized", async await dialog.getByRole("button", { name: "Add step", exact: true }).click(); await page.getByRole("menuitem", { name: "Send Message" }).click(); - await dialog.getByLabel("Message text").fill("first message"); + const messageText = dialog + .getByLabel("Message text") + .and(dialog.locator("#wf-step-0-text")); + await messageText.fill("first message"); + await expect(messageText).toHaveValue("first message"); await expect(page).toHaveURL(/pane=step%3Astep_1/); await dialog.getByRole("button", { name: "Add after Step 1" }).click();