Skip to content

test(ui-test): wait for what a step needs, act once - #112

Merged
BartvHelvert merged 1 commit into
masterfrom
fix/ui-test-stability
Nov 7, 2026
Merged

BartvHelvert merged 1 commit into
masterfrom
fix/ui-test-stability

Conversation

@BartvHelvert

@BartvHelvert BartvHelvert commented Nov 7, 2026 •

Copy link
Copy Markdown
Owner

What this changes

Makes the split-mode UI tests wait for the state each step needs and perform each action once,
instead of replaying actions on a timer or swallowing every failure while polling.

  • One shared wait, awaitProbeValue, polls observations only. It retries the driver's lookup
    timeouts, components that went away and expired driver references, keeps the last value and
    failure for the timeout message, and lets any other failure through at once. Waits for the
    extension host or an extension to start pass retrying = ::isStartupFailure, since
    executeCommandForTest throws while the host starts. The per-class copies of the wait are gone.
  • Send clicks, stripe clicks, and the commands that open editors or notebooks now run once and their
    result is awaited, so a slow acknowledgement can no longer produce a second action.
  • Before shortcuts, the custom editor tests wait for the client frame and then the page's value
    element to have focus. The client frame's startup focus request is repeated (it's idempotent)
    for up to 30 s.
  • The colour picker test types into the picker's hex field, rather than assuming which field has
    focus initially.
  • The notebook's running-time label accepts a decimal comma.
  • The heavy-webview and Run Cell timing budgets apply only with -PuiTestPerformance=true. The
    loads themselves are still checked on every run.
  • UI tests run in one fork with JUnit parallelism off. A failed workbench test saves the UI
    hierarchy to <test>-probe/, which CI already uploads.

Preserves master's switcher popup activation and three editor round trips from #104.

Fixes #108

How it was tested

  • ProbeWaitTest (new, 9 tests): retry, timeout cause, startup retry, cancellation, null values. All pass.

  • Full :ui-test:test in WSL/Xvfb on the branch rebased onto master: 57 tests, 2 failed.

    • The editor switcher test failed in this branch's own switcher changes. I reverted those to
      master's version, which test(ui-test): choose switcher items without key input #104 owns.
    • the strip between cells adds a code or markdown cell there failed once: Escape didn't render
      the markdown cell (last observed [# Top, one, mid, two]). This branch doesn't touch that code.
  • Rerun of SplitModeNotebookTest and SplitModeCustomEditorTest after the revert: 13/13 and 6/6 pass.

  • Not run: Windows and macOS UI runs. CI will cover them.

  • Rebased onto master 989aec7a at b359a9c1, resolving the switcher import conflict while retaining PopupUtilRef activation and the three round trips from test(ui-test): choose switcher items without key input #104.

  • After rebase: ProbeWaitTest passes (9 tests). The focused switcher UI run compiles but fails before the scenario, waiting for the client's frame to gain focus under local WSL/Xvfb; the sequential rerun has the same startup failure. Rebased CI run 42378693332 passed all three unit/integration jobs, plugin build/verification, both Ubuntu UI shards and Windows UI shard 1. Windows UI shard 2 failed only the switcher scenario (the file shown as text, tracked in reopened Custom editor switcher UI test leaves its selected popup item open #103). No full local suite rerun for the import-only conflict resolution.

Checklist

  • Nothing is special-cased for one extension.
  • A new feature has a UI test. No feature; test-only change.
  • No internal, override-only, obsolete or deprecated platform API.
  • docs/ is updated where behaviour changed, docs/status.md especially. No product behaviour changed; src/test-extensions/README.md is updated.
  • Third-party material keeps its notice and is listed in NOTICE.md. None added.

Waits polled until a timeout swallowed every failure, and several
interactions were replayed on a timer: Send clicks, stripe clicks,
commands that open editors. A replayed action can land twice, and a
swallowed failure hides why a wait timed out.

One shared wait now polls observations only. It retries the driver's
lookup timeouts, components that went away and expired references,
keeps the last value and failure for the timeout message, and lets
anything else fail at once. Waits for the extension host or an
extension to start opt in to retrying startup errors as well.

Actions run once and their result is awaited. Shortcuts wait for the
frame and the page's element to have focus first. The colour picker is
driven through its hex field rather than its initial focus. The
notebook timer accepts a decimal comma. Strict timing budgets only
apply with -PuiTestPerformance=true, and UI tests run serially. A
failed workbench test saves the UI hierarchy beside the IDE logs.

Refs #108
@BartvHelvert
BartvHelvert force-pushed the fix/ui-test-stability branch from ce01f09 to b359a9c Compare November 7, 2026 13:49
@BartvHelvert
BartvHelvert merged commit d0d32ba into master Nov 7, 2026
7 of 8 checks passed
@BartvHelvert
BartvHelvert deleted the fix/ui-test-stability branch November 7, 2026 17:46
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.

UI tests have timing-sensitive interactions and waits

1 participant