Skip to content

test(desktop): make operator grid check direction-independent - #6744

Open
roseonlineownz-lab wants to merge 1 commit into
block:mainfrom
roseonlineownz-lab:fix/workflow-operator-grid-test
Open

test(desktop): make operator grid check direction-independent#6744
roseonlineownz-lab wants to merge 1 commit into
block:mainfrom
roseonlineownz-lab:fix/workflow-operator-grid-test

Conversation

@roseonlineownz-lab

Copy link
Copy Markdown

Why

The Desktop Smoke E2E failure on broker PR #6742 is unrelated to its SDK-only diff. The deterministic failure is an LTR-only assertion in workflow-local-controls.spec.ts: it requires the second operator button to have a larger x-coordinate than the first.

The component deliberately uses a two-column CSS grid. Column direction is not a product invariant; the test should verify that the first two controls occupy distinct columns on the same row and that the third starts the next row.

Change

Replace the directional x-order assertion with a non-zero horizontal-separation assertion. Existing same-row and next-row assertions remain unchanged.

Evidence

  • broker: define the agent-to-broker action contract #6742 changes only buzz-sdk broker files; it does not touch Desktop UI or E2E code.
  • On its merge CI run, the hard failure was workflow-local-controls.spec.ts:297: first x=1132.00, second x=1093.48.
  • The same test source exists at the PR base and head.

No runtime, pairing, install, or merge action was performed.

@roseonlineownz-lab
roseonlineownz-lab marked this pull request as ready for review August 25, 2026 03:33
@roseonlineownz-lab
roseonlineownz-lab requested a review from a team as a code owner August 25, 2026 03:33

Copy link
Copy Markdown
Author

Could a maintainer approve the Actions run for this external-fork PR?

It is a one-line, test-only stabilization: the Desktop operator-grid test no longer assumes LTR column order, while retaining the same-row / next-row layout checks. This was isolated from the unrelated broker-contract PR #6742 CI failure. No runtime, transport, or product behavior changes.

@Chessing234 Chessing234 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the reasoning is right — column direction isn't a product invariant and a test shouldn't pin it — but i think the replacement asserts something weaker than what you actually want, and the pr leaves the interesting question unanswered.

the new assertion no longer checks "distinct columns".

expect(Math.abs(secondBox.x - firstBox.x)).toBeGreaterThan(1);

that passes for any two elements more than one pixel apart horizontally, including two controls stacked in the same grid column with slightly different insets, or a layout that collapsed to one column and offset the second control by a margin. the stated intent is "the first two controls occupy distinct columns on the same row"; a non-overlap assertion says that directly and is still direction-agnostic:

const [left, right] = [firstBox, secondBox].sort((a, b) => a.x - b.x);
expect(left.x + left.width).toBeLessThanOrEqual(right.x + 1);

that fails if they share a column and stays green under RTL. the < 1 same-row and next-row assertions around it are already the right shape.

what actually flipped the order? the pr says the failure is deterministic on #6742, whose diff is SDK-only. so something in the smoke environment renders this grid right-to-left, and neither the pr nor the test says what — a locale, a dir attribute, a browser default. if the answer is "the app is being rendered RTL in that job", that's worth knowing on its own, because it means every other x-coordinate assertion in the e2e suite is a latent failure of the same kind and this one just happened to be hit first. if the answer is "we don't know", relaxing the assertion makes a green run that nobody can explain, which is the failure mode where the next occurrence costs the same investigation again.

either way, one line in the test naming the reason it must not assume LTR would keep the next person from tightening it back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants