Skip to content

Commit 1143af3

Browse files
loganjLarry
andcommitted
test(desktop): fix workflow step-text fill race and inspector box timing
- addMessageStep fills the step-owned textarea (id wf-step-*-text) instead of the ambiguous getByLabel("Message text"), so the fill auto-waits for the entering step pane and can never land in the exiting trigger condition input during AnimatePresence. - template-variables spec uses the same owned-textarea locator for the identical step-pane fill race (the fill was landing in the exiting trigger "Message text" input, so the autocomplete listbox never opened). - message-condition round-trip waits for animations after opening the trigger inspector before reading operator bounding boxes, so the ~240ms inspector width transition cannot distort sequential box positions. Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz> Signed-off-by: Logan Johnson <[email protected]>
1 parent bd05f63 commit 1143af3

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎desktop/tests/e2e/workflow-local-controls.spec.ts‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ async function addMessageStep(
6464
) {
6565
await dialog.getByRole("button", { name: "Add step", exact: true }).click();
6666
await page.getByRole("menuitem", { name: "Send Message" }).click();
67-
await dialog.getByLabel("Message text").fill("Workflow notification");
67+
await dialog
68+
.locator('textarea[id^="wf-step-"][id$="-text"]')
69+
.fill("Workflow notification");
6870
}
6971

7072
async function createEnabled(
@@ -153,7 +155,7 @@ test("inserts template variables with keyboard control and restores the caret",
153155
await dialog.getByRole("button", { name: "Add step", exact: true }).click();
154156
await page.getByRole("menuitem", { name: "Send Message" }).click();
155157

156-
const textarea = dialog.getByLabel("Message text");
158+
const textarea = dialog.locator('textarea[id^="wf-step-"][id$="-text"]');
157159
const listbox = page.getByRole("listbox");
158160
await textarea.fill("Hello {{trig");
159161
await expect(listbox).toBeVisible();
@@ -287,6 +289,7 @@ test("round-trips and reopens structured message-text conditions", async ({
287289

288290
await dialog.getByRole("tab", { name: "Form" }).click();
289291
await openTriggerInspector(dialog);
292+
await waitForAnimations(page);
290293
const matchControls = dialog.getByRole("group", { name: "Match" });
291294
const operatorButtons = matchControls.getByRole("button");
292295
const firstOperatorBox = await operatorButtons.nth(0).boundingBox();

0 commit comments

Comments
 (0)