Skip to content

Simplify video test fixtures#7

Open
mmkal wants to merge 3 commits into
mainfrom
test/simplify-video-fixtures
Open

Simplify video test fixtures#7
mmkal wants to merge 3 commits into
mainfrom
test/simplify-video-fixtures

Conversation

@mmkal

@mmkal mmkal commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Video fixtures now keep only styles that the tests measure.

Presentation CSS such as cards, typography, spacing, and decorative layouts is gone. Geometry, visibility, and state colors remain inline where frame analysis or cursor detection depends on them.

<!-- before -->
<style>
  #target {
    position: absolute;
    /* ... */
  }
</style>
<div id="target"></div>

<!-- after -->
<div id="target" style="position: absolute; /* measured geometry and color */"></div>

This removes 304 lines from the video specs without changing video-mode runtime behavior or public APIs.

Videos

Playwright steps remain useful captions with browser-default fixture styling:

video-rendered.webm

Dead-air compression, holds, cursor movement, and post-rendered highlights still read clearly:

video-rendered.webm

Synthetic dialog rendering and its pointer click still preserve the measured visual state:

video-rendered.webm

Validation

  • pnpm exec playwright test spec/video-mode.spec.ts spec/video-mode-auto-start.spec.ts spec/video-mode-ffmpeg.spec.ts — 40 passed
  • pnpm test — 74 passed, 3 skipped
  • pnpm typecheck
  • pnpm build
  • pnpm exec publint

Note

Low Risk
Test-only fixture markup changes with no production or API surface touched; behavior preserved per passing video specs.

Overview
Strips presentation-only CSS from video-related Playwright specs (video-mode-auto-start, video-mode-ffmpeg, video-mode) so fixtures read like tests, not mini apps. <style> blocks are removed (~304 lines); decorative layout, typography, and card chrome go away.

Assertion-critical styling stays as minimal one-line style attributes or script-driven updates: colors and geometry for pixel/frame analysis, visibility (hidden instead of display/visibility toggles where appropriate), spinner/disabled state colors, and blank→content startup fixtures (e.g. a single red panel instead of four quadrants).

No changes to videoMode runtime, public APIs, or test timing/viewport/assertion intent; a completed task note documents validation (focused + full suite).

Reviewed by Cursor Bugbot for commit 2c637b7. Bugbot is set up for automated code reviews on this repo. Configure here.

@pkg-pr-new

pkg-pr-new Bot commented Jul 24, 2026

Copy link
Copy Markdown

Open in StackBlitz

pnpm add https://pkg.pr.new/middlewright@7

commit: 2c637b7

@mmkal
mmkal marked this pull request as ready for review July 24, 2026 14:37
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.

1 participant