test: exercise document visibility WebGL screenshots in rendered CI

This commit is contained in:
Neil
2026-09-06 00:15:05 -07:00
parent 04842b0cff
commit bfccc7c5d6
2 changed files with 7 additions and 11 deletions
+1 -1
View File
@@ -246,7 +246,7 @@ jobs:
E2E_PROJECT_ARGS+=(--project=electron-headful)
fi
xvfb-run --auto-servernum bash .github/scripts/e2e-with-window-manager.sh env "${E2E_ENV[@]}" \
pnpm run test:e2e "${TEST_FILES[@]}" --workers=1 "${E2E_PROJECT_ARGS[@]}"
pnpm run test:e2e "${TEST_FILES[@]}" --workers=1 "${E2E_PROJECT_ARGS[@]}" --repeat-each=3
- name: Upload Playwright traces
if: failure()
@@ -35,6 +35,7 @@ import {
discoverActivePtyId,
execInTerminal,
waitForActiveTerminalManager,
waitForActivePanePtyId,
waitForPaneCount,
waitForTerminalOutput
} from './helpers/terminal'
@@ -146,6 +147,11 @@ test.describe('reattach mouse-mode leak', () => {
await ensureTerminalVisible(secondLaunch.page)
await waitForActiveTerminalManager(secondLaunch.page, 30_000)
await waitForPaneCount(secondLaunch.page, 1, 30_000)
// Live output is released only after reattach replay has finished.
const reattachedPtyId = await waitForActivePanePtyId(secondLaunch.page)
await execInTerminal(secondLaunch.page, reattachedPtyId, 'echo ORCA_REATTACHED_$((21+21))')
await waitForTerminalOutput(secondLaunch.page, 'ORCA_REATTACHED_42', 15_000)
// The reattach replay re-arms mouse via rehydrate, then the reset must
// clear it. Poll until it settles to 'none' (times out if the reset
@@ -261,16 +267,6 @@ test.describe('reattach mouse-mode leak', () => {
expect(probe.afterReattach.mode).toBe('none')
expect(probe.afterReattach.hasEnableMouseClass).toBe(false)
expect(probe.afterReattach.reports).toBe(0)
// Why: the positive control needs the reattached pane to dynamically bind
// xterm's browser MouseService. Some headless CI renderers never do on a warm
// reattach — the core mouseTrackingMode still flips but no DOM class/listener
// attaches — so arming is impossible and the probe can't run. Skip there,
// matching the pane-manager/shell guards above; the reset invariant stays
// covered by repro-7329 + pty-connection unit tests and this suite on macOS.
test.skip(
!probe.armedMouseReporting,
'Reattached pane does not dynamically bind xterm mouse reporting in this environment'
)
// Positive control proves the motion probe genuinely detects reports.
expect(probe.classAfterArm).toBe(true)
expect(probe.armedReports).toBeGreaterThan(0)