You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
e2e: per-test resets silently skipped for all but the first spec file per worker; client exceptions invisible #17955
Three related robustness gaps in the desktop e2e harness, found while chasing the residual environment-pane flake after #17953:
Per-test resets only ran for the first spec file in each worker. The reset was registered via a module-scope test.beforeEach in rstudio.fixture.ts; Node caches the module per worker process, so the hook attached only to the suite of the first file that imported it. Every subsequent file in that worker ran with no per-test reset at all -- leaked state (modals, debug mode, pane maximize, source buffers) flowed freely between those tests. This is exactly how rnotebook.test.ts's leaked Viewer maximize hid the Environment tab for environment_pane.test.ts's first test (the retry passed because the replacement worker loaded the file first). Confirmed empirically: instrumented runs showed the reset firing for the first file's tests and never for the second file's.
Uncaught client exceptions were invisible to the harness. The only artifact was GWT's "Error" dialog (message, no stack), which the next reset dismissed silently -- so a real product bug could hide behind passing tests indefinitely (the dialog from error dialog (TypeError: null contentWindow) when rearranging panes on short windows #17954 was only discovered via failure screenshots). The server_.logException path does not reliably land in the sandbox session logs either.
Local and CI ran at different window geometry. The fixture requested 1400x900, but macOS clamps windows to the visible frame, so CI (1024x645 workArea) silently tested a different layout than local runs -- which is why the ensure-height pane maximize and the ImageFrame TypeError surfaced only on CI.
Fixes: the reset becomes an auto test-scoped fixture (runs for every test in every file); the automation agent records uncaught exceptions (message + stack) into window.rstudio.errors, and the harness drains the record after every test, failing the test that raised one (PW_IGNORE_CLIENT_EXCEPTIONS=1 opts out) and logging the text of any modal it dismisses; the window geometry is pinned to 1024x645 everywhere (800x600 evaluated and rejected: it genuinely cramps layouts and broke 7 tests).
Activity
remove per-suite sandbox timeline logging from e2e tests (#18118)