Skip to content

Move local-only capture lifecycle tests into the Windows CI capture smoke #300

Closed

Description

@TMHSDigital

Summary

Several safety behaviours are only tested in the local-only localCapture.test.ts. Hosted Windows runners already run gdigrab/ddagrab in captureSmoke, so most of these could run in CI.

Where

  • src/tests/localCapture.test.ts:26, 53 (gated by RUN_LOCAL_CAPTURE_TESTS)
  • src/tests/captureSmoke.test.ts:72-153
  • .github/workflows/ci.yml:124, 132 (only RUN_CAPTURE_SMOKE set)

Details

Local-only today: client-disconnect finalization (#76), maxDurationSec self-stop (#82), orphan reaping at startup, event log (#118), WGC record/screenshot (#113), wait_for_change (#116).

Impact

Regressions in lifecycle and privacy behaviours can reach releases with CI green.

Suggested fix

Move cases that need no special window setup into captureSmoke:

  • maxDurationSec: 2 self-ends with endReason max_duration, file probes ~2 s
  • Orphaned ffmpeg reaped at startup
  • Client disconnect finalizes the recording
  • events: true round trip
  • wait_for_change: settle on a static region returns settled; change with timeoutSec: 1 returns timeout
  • WGC: try in smoke with retry, non-blocking

Acceptance criteria

  • Checklist cases run on the Windows CI leg

Getting started

  • Relevant files: src/__tests__/localCapture.test.ts, src/__tests__/captureSmoke.test.ts, .github/workflows/ci.yml
  • How to run tests: npm run build && npm test (also npm run typecheck and npm run lint)
  • Related docs: CONTRIBUTING.md, AGENTS.md

Filed by repo-audit/full-audit at f2fda28. Severity: medium. Effort: M. audit-key: testing|src/__tests__/captureSmoke.test.ts|ci-capture-scope

Activity

  1. added
    help wanted
    testing
    on Nov 9, 2026
  2. TMHSDigital commented on Nov 10, 2026

    @TMHSDigital
    OwnerAuthor

    Fixed in a97cea1, with the events part landing in ea59ff2. These cases now run in captureSmoke.test.ts on every Windows CI leg and in the record-smoke-test job:

    • maxDurationSec: 2 self-ends with max_duration and leaves a file of about 2 s
    • an orphaned ffmpeg is reaped at startup
    • a client disconnect finalizes the recording and both processes exit
    • the events: true round trip
    • wait_for_change returns settled for settle mode and timeout for change mode with timeoutSec: 1

    The moved cases were removed from localCapture.test.ts. All of them passed locally.

    WGC is not moved yet. It needs a visible window that it then covers, which the local suite sets up and a hosted runner does not have yet. If WGC in CI is still wanted, that can be a separate non-blocking job.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedpriority: mediumtesting

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions