Skip to content

Add screenshot regression test - #286

Merged
panglesd merged 16 commits into
mainfrom
screenshot-regression-test
Oct 25, 2026
Merged

panglesd merged 16 commits into
mainfrom
screenshot-regression-test

Conversation

@panglesd

Copy link
Copy Markdown
Owner

Implemented with playwright. Adds a node dependency for tests but ok.

Let's see if the CI is properly setup.

@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
Walkthrough

Adds a Playwright runner that discovers configured screenshot tests and captures presentation steps. Adds screenshot scenarios and Dune build rules for presentations and examples. Adds a GitHub Actions workflow to build the project and run the browser tests. Adds test documentation and ignore rules. Removes several prior compiler and engine test scripts. The scale container now applies its transform hint during qualifying zooms and clears it when the transition ends or is cancelled.

Priority: Low

Severity of issue fixed: Low

Merge Risk: Low · up to bdb01

Screenshot tests reload presentations more often than intended, but the remaining issue is bounded test-suite overhead. The change is mergeable with a follow-up to restore page reuse.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 4 files. (3 skipped: 3… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description check Passed The description identifies the Playwright implementation, the Node test dependency, and CI setup. It is related to the changeset.
Title check Passed The title clearly and concisely describes the primary change: adding screenshot regression tests.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 4 files. (3 skipped: 3 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8c407cd9-dee7-4065-a995-3c3854a7641a
Commits

Reviewing files that changed from the base of the PR and between de34232 and b5f7fd0.

Files ignored due to path filters: 161
  • test/screenshot-based/action-arguments/screenshots/actions-step-00-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/action-arguments/screenshots/actions-step-00-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/action-arguments/screenshots/actions-step-01-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/action-arguments/screenshots/actions-step-01-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/auto-next/screenshots/auto-next-step-00-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/auto-next/screenshots/auto-next-step-00-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/auto-next/screenshots/auto-next-step-01-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/auto-next/screenshots/auto-next-step-01-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/auto-next/screenshots/auto-next-step-02-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/auto-next/screenshots/auto-next-step-02-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/carousel/screenshots/carousel-step-00-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/carousel/screenshots/carousel-step-00-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/carousel/screenshots/carousel-step-01-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/carousel/screenshots/carousel-step-01-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/carousel/screenshots/carousel-step-02-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/carousel/screenshots/carousel-step-02-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/carousel/screenshots/carousel-step-03-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/carousel/screenshots/carousel-step-03-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/carousel/screenshots/carousel-step-04-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/carousel/screenshots/carousel-step-04-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/carousel/screenshots/carousel-step-05-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/carousel/screenshots/carousel-step-05-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/carousel/screenshots/carousel-step-06-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/carousel/screenshots/carousel-step-06-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/carousel/screenshots/carousel-step-07-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/carousel/screenshots/carousel-step-07-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/carousel/screenshots/carousel-step-08-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/carousel/screenshots/carousel-step-08-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/carousel/screenshots/carousel-step-09-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/carousel/screenshots/carousel-step-09-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/carousel/screenshots/carousel-step-10-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/carousel/screenshots/carousel-step-10-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/carousel/screenshots/carousel-step-11-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/carousel/screenshots/carousel-step-11-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/carousel/screenshots/carousel-step-12-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/carousel/screenshots/carousel-step-12-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/carousel/screenshots/carousel-step-13-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/carousel/screenshots/carousel-step-13-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/carousel/screenshots/carousel-step-14-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/carousel/screenshots/carousel-step-14-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/carousel/screenshots/carousel-step-15-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/carousel/screenshots/carousel-step-15-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/dimension/screenshots/custom-step-00-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/dimension/screenshots/custom-step-00-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/dimension/screenshots/quatre-tiers-step-00-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/dimension/screenshots/quatre-tiers-step-00-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/dimension/screenshots/seize-neuvieme-step-00-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/dimension/screenshots/seize-neuvieme-step-00-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/drawings/screenshots/drawings-step-00-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/drawings/screenshots/drawings-step-00-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/drawings/screenshots/drawings-step-01-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/drawings/screenshots/drawings-step-01-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/drawings/screenshots/drawings-step-02-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/drawings/screenshots/drawings-step-02-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/examples/screenshots/bobkonf-step-00-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/examples/screenshots/bobkonf-step-00-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/examples/screenshots/bobkonf-step-01-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/examples/screenshots/bobkonf-step-01-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/examples/screenshots/bobkonf-step-02-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/examples/screenshots/bobkonf-step-02-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/examples/screenshots/bobkonf-step-03-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/examples/screenshots/bobkonf-step-03-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/examples/screenshots/bobkonf-step-04-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/examples/screenshots/bobkonf-step-04-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/examples/screenshots/bobkonf-step-05-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/examples/screenshots/bobkonf-step-05-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/examples/screenshots/bobkonf-step-80-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/examples/screenshots/bobkonf-step-80-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/examples/screenshots/campus-du-libre-step-00-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/examples/screenshots/campus-du-libre-step-00-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/examples/screenshots/campus-du-libre-step-01-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/examples/screenshots/campus-du-libre-step-01-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/examples/screenshots/campus-du-libre-step-02-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/examples/screenshots/campus-du-libre-step-02-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/examples/screenshots/campus-du-libre-step-03-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/examples/screenshots/campus-du-libre-step-03-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/examples/screenshots/campus-du-libre-step-04-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/examples/screenshots/campus-du-libre-step-04-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/examples/screenshots/campus-du-libre-step-05-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/examples/screenshots/campus-du-libre-step-05-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/highlight-js/screenshots/hljs-step-00-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/highlight-js/screenshots/hljs-step-00-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/math/screenshots/katex-step-00-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/math/screenshots/katex-step-00-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/math/screenshots/mathjax-step-00-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/math/screenshots/mathjax-step-00-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/multi-file/screenshots/main-step-00-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/multi-file/screenshots/main-step-00-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/multi-file/screenshots/main-step-01-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/multi-file/screenshots/main-step-01-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/multi-file/screenshots/main-step-02-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/multi-file/screenshots/main-step-02-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/multi-file/screenshots/main-step-03-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/multi-file/screenshots/main-step-03-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/normal-slides/happy.svg is excluded by !**/*.svg
  • test/screenshot-based/normal-slides/screenshots/slides-step-00-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/normal-slides/screenshots/slides-step-00-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/normal-slides/screenshots/slides-step-01-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/normal-slides/screenshots/slides-step-01-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/normal-slides/screenshots/slides-step-02-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/normal-slides/screenshots/slides-step-02-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/normal-slides/screenshots/slides-step-03-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/normal-slides/screenshots/slides-step-03-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/normal-slides/screenshots/slides-step-04-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/normal-slides/screenshots/slides-step-04-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/normal-slides/screenshots/slides-step-05-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/normal-slides/screenshots/slides-step-05-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/package-lock.json is excluded by !**/package-lock.json
  • test/screenshot-based/pdf/screenshots/pdf-step-00-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/pdf/screenshots/pdf-step-00-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/pdf/screenshots/pdf-step-01-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/pdf/screenshots/pdf-step-01-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/pdf/screenshots/pdf-step-02-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/pdf/screenshots/pdf-step-02-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/pdf/screenshots/pdf-step-09-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/pdf/screenshots/pdf-step-09-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/pdf/screenshots/pdf-step-15-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/pdf/screenshots/pdf-step-15-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/pdf/screenshots/pdf-step-19-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/pdf/screenshots/pdf-step-19-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/pdf/screenshots/pdf-step-21-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/pdf/screenshots/pdf-step-21-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/pdf/screenshots/pdf-step-95-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/pdf/screenshots/pdf-step-95-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-00-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-00-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-01-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-01-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-02-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-02-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-03-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-03-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-04-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-04-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-05-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-05-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-06-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-06-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-07-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-07-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-08-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-08-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-09-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-09-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-10-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-10-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-11-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-11-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-12-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-12-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-13-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-13-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-14-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-14-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-15-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-15-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-16-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-16-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/svg/screenshots/svg-step-00-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/svg/screenshots/svg-step-00-firefox-linux.png is excluded by !**/*.png
  • test/screenshot-based/svg/square.svg is excluded by !**/*.svg
Files selected for processing: 39
  • .github/workflows/playwright.yml
  • .gitignore
  • test/README.md
  • test/compiler/carousel.t/run.t
  • test/compiler/highlight-js.t/run.t
  • test/compiler/normal-slides.t/run.t
  • test/compiler/svg.t/run.t
  • test/engine/action-arguments.t/run.t
  • test/engine/basic.t/new_engine.md
  • test/engine/basic.t/run.t
  • test/screenshot-based/action-arguments/actions.md
  • test/screenshot-based/action-arguments/run.json
  • test/screenshot-based/auto-next/auto-next.slp
  • test/screenshot-based/auto-next/run.json
  • test/screenshot-based/carousel/carousel.md
  • test/screenshot-based/carousel/run.json
  • test/screenshot-based/cram.spec.js
  • test/screenshot-based/dimension/custom.slp
  • test/screenshot-based/dimension/quatre-tiers.slp
  • test/screenshot-based/dimension/run.json
  • test/screenshot-based/dimension/seize-neuvieme.slp
  • test/screenshot-based/drawings/run.json
  • test/screenshot-based/dune
  • test/screenshot-based/examples/dune
  • test/screenshot-based/examples/run.json
  • test/screenshot-based/highlight-js/hljs.md
  • test/screenshot-based/highlight-js/run.json
  • test/screenshot-based/math/katex.slp
  • test/screenshot-based/math/mathjax.slp
  • test/screenshot-based/math/run.json
  • test/screenshot-based/multi-file/run.json
  • test/screenshot-based/normal-slides/run.json
  • test/screenshot-based/normal-slides/slides.md
  • test/screenshot-based/package.json
  • test/screenshot-based/pdf/run.json
  • test/screenshot-based/playwright.config.js
  • test/screenshot-based/slides/run.json
  • test/screenshot-based/svg/run.json
  • test/screenshot-based/svg/svg.md
Files with no reviewable changes: 7
  • test/compiler/normal-slides.t/run.t
  • test/engine/basic.t/new_engine.md
  • test/compiler/carousel.t/run.t
  • test/compiler/svg.t/run.t
  • test/engine/action-arguments.t/run.t
  • test/compiler/highlight-js.t/run.t
  • test/engine/basic.t/run.t

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

Comment thread .github/workflows/playwright.yml
Comment thread test/screenshot-based/cram.spec.js Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

Minor · Wait for the requested step before capturing the screenshot. · cram.spec.js:68-80

test/screenshot-based/cram.spec.js:68-80
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Wait for the requested step before capturing the screenshot.

The harness sets readiness when it receives (payload Ready), then starts toHaveScreenshot immediately. The parent sends State (i, Fast) only after receiving Ready. The iframe can therefore still show its initial step when the screenshot assertion starts.

This affects every configured scenario with a nonzero step. Make the shared harness readiness condition wait until the requested state has been applied and rendered.


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 045e0979-972c-4442-97b3-e98180f1192c
Commits

Reviewing files that changed from the base of the PR and between b5f7fd0 and acc6ca2.

Files selected for processing: 1
  • .github/workflows/playwright.yml

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

Instead of in the javascript playwright driver
Browser rendering depends on the fonts and libraries of the host
I don't really understand how `will-change` works. It made it smoother in many
case, but sometimes it also made it blurry (until a "rerender" happened).

This lead to issues like #260. But also, lots of issues in screenshot-based
testing.

An LLM suggested the following fix, where `will-change` is only set when there
is a transition. Here are its own words, with big words like "rasterized":

> With will-change: transform, Chrome keeps the scale container rasterized
> at the scale it had when first painted, and stretches that bitmap when
> the scale changes, so content is blurry after zooming in. The property
> is now set only while a scale transition runs, and removed on
> transitionend/transitioncancel, so that the content is rasterized again
> at the final scale.
Currently, it hardcodes the encoding of the message (defined in OCaml, but sent
here from JavaScript). This "hack" should be improved, by using jsoo!

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8ad6bdf8-2206-4433-8a6b-a5cf851814f9
Commits

Reviewing files that changed from the base of the PR and between bf16341 and bdb01c4.

Files ignored due to path filters: 71
  • test/screenshot-based/action-arguments/screenshots/actions-step-00-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/action-arguments/screenshots/actions-step-01-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/auto-next/screenshots/auto-next-step-00-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/auto-next/screenshots/auto-next-step-01-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/auto-next/screenshots/auto-next-step-02-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/carousel/screenshots/carousel-step-00-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/carousel/screenshots/carousel-step-01-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/carousel/screenshots/carousel-step-02-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/carousel/screenshots/carousel-step-03-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/carousel/screenshots/carousel-step-04-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/carousel/screenshots/carousel-step-05-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/carousel/screenshots/carousel-step-06-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/carousel/screenshots/carousel-step-07-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/carousel/screenshots/carousel-step-08-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/carousel/screenshots/carousel-step-09-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/carousel/screenshots/carousel-step-10-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/carousel/screenshots/carousel-step-11-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/carousel/screenshots/carousel-step-12-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/carousel/screenshots/carousel-step-13-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/carousel/screenshots/carousel-step-14-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/carousel/screenshots/carousel-step-15-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/dimension/screenshots/custom-step-00-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/dimension/screenshots/quatre-tiers-step-00-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/dimension/screenshots/seize-neuvieme-step-00-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/drawings/screenshots/drawings-step-01-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/drawings/screenshots/drawings-step-02-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/examples/screenshots/bobkonf-step-00-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/examples/screenshots/bobkonf-step-01-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/examples/screenshots/bobkonf-step-02-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/examples/screenshots/bobkonf-step-03-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/examples/screenshots/bobkonf-step-04-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/examples/screenshots/bobkonf-step-05-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/examples/screenshots/bobkonf-step-80-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/examples/screenshots/campus-du-libre-step-00-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/examples/screenshots/campus-du-libre-step-01-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/examples/screenshots/campus-du-libre-step-02-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/examples/screenshots/campus-du-libre-step-03-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/examples/screenshots/campus-du-libre-step-04-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/examples/screenshots/campus-du-libre-step-05-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/highlight-js/screenshots/hljs-step-00-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/math/screenshots/katex-step-00-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/multi-file/screenshots/main-step-00-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/multi-file/screenshots/main-step-01-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/multi-file/screenshots/main-step-02-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/multi-file/screenshots/main-step-03-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/normal-slides/screenshots/slides-step-00-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/normal-slides/screenshots/slides-step-01-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/normal-slides/screenshots/slides-step-02-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/normal-slides/screenshots/slides-step-03-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/normal-slides/screenshots/slides-step-04-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/normal-slides/screenshots/slides-step-05-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/pdf/screenshots/pdf-step-00-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/pdf/screenshots/pdf-step-01-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/pdf/screenshots/pdf-step-19-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/pdf/screenshots/pdf-step-21-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-00-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-01-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-02-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-03-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-04-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-05-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-06-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-07-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-08-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-10-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-11-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-12-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-13-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-14-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-15-chromium-linux.png is excluded by !**/*.png
  • test/screenshot-based/slides/screenshots/slides-step-16-chromium-linux.png is excluded by !**/*.png
Files selected for processing: 4
  • CHANGELOG.md
  • src/engine/runtime/universe/universe.css
  • src/engine/runtime/universe/window.ml
  • test/screenshot-based/cram.spec.js

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

// presentation again.
let page;

test.beforeAll(async ({ browser }) => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor · Performance & Scalability · Quick win

🔎 Supported by static analysis

Script executed:

cat test/screenshot-based/playwright.config.js
sed -n '1,110p' test/screenshot-based/cram.spec.js

Repository: panglesd/slipshow

Length of output: 5357


Script executed:

set -eu
printf '%s\n' '--- test discovery ---'
sed -n '1,240p' test/screenshot-based/tests.js
printf '%s\n' '--- screenshot test files and likely step sources ---'
rg --files test/screenshot-based | sort
printf '%s\n' '--- step/test declarations in the screenshot suite ---'
rg -n -F --glob '*' -e 'steps' -e 'findTests' -e 'step' test/screenshot-based || test "$?" -eq 1
printf '%s\n' '--- relevant diff against the supplied merge base ---'
git diff --stat de342323da3a9e8e1bd1cdbec94d1ce812106959 bdb01c47d66241cd63d27fcf199b58dbb8a205e0 -- test/screenshot-based
git diff --unified=20 de342323da3a9e8e1bd1cdbec94d1ce812106959 bdb01c47d66241cd63d27fcf199b58dbb8a205e0 -- test/screenshot-based/cram.spec.js test/screenshot-based/tests.js

Repository: panglesd/slipshow

Length of output: 39968


Web query:

Playwright Test fullyParallel beforeAll workers 1 test.describe.configure mode default

Result:

<source_evidence>
<source kind="search">
<title>Playwright Test | Playwright</title>
<location>https://playwright.dev/docs/api/class-test</location>
<excerpt>citeturn0search0 [wordlim: 200] Crawled: 4 days ago; Note that worker process is restarted on test failures, and `beforeAll` hook runs again in the new worker. ... Playwright will continue running all applicable hooks even if some of them have failed. ...     test.describe.configure({ mode: &#39;parallel&#39; }); ... By default, tests in a single test file run one after another, but using test.describe.parallel() allows them to run in parallel. ...       * `description` string (optional)

### test.beforeAll​

Added in: v1.10 test.test.beforeAll

Declares a `beforeAll` hook that is executed once per worker process before all tests.

When called in the scope of a test file, runs before all tests in the file. When called inside a test.describe() group, runs before all tests in the group.

You can use test.afterAll() to teardown any resources set up in `beforeAll`.

  * `test.beforeAll(hookFunction)`
  * `test.beforeAll(title, hookFunction)`

Usage

example.spec.ts
    
    `
    
    import { test, expect } from &#39;@playwright/test&#39;;
    
    test.beforeAll(async () =&gt; {
    
      console.log(&#39;Before tests&#39;);
    
    });
    
    test.afterAll(async () =&gt; {
    
      console.log(&#39;After tests&#39;);
    
    });
    
    test(&#39;my test&#39;, async ({ page }) =&gt; {
    
      // ...
    
    });
    
    `

Alternatively, you can declare a hook with a title.

example.spec.ts
    
    `
    
    test.beforeAll(&#39;Setup&#39;, async () =&gt; {
    
      console.log(&#39;Before tests&#39;);
    
    });
    
    `

Arguments

  * `title` string (optional) Added in: v1.38#

Hook title.

  * `hookFunction` function(Fixtures, TestInfo)#

Hook function that takes one or two arguments: an object with worker fixtures and optional TestInfo.

Details

When multiple `beforeAll` hooks are added, they will run in the order of their registration.

Note that worker process is restarted on test failures, and `beforeAll` hook runs again in the new worker. Learn more about workers and failures.

Playwright will continue running all applicable hooks even if some of them have failed.

### test.describe.configure​

Added in: v1.10 test.test.describe.configure

Configures the enclosing scope. Can be executed either on the top level or inside a describe. Configuration applies to the entire scope, regardless of whether it run before or after the test declaration.

Learn more about the execution modes here.

Usage

  * Running tests in parallel.
    
    `
    
    // Run all the tests in the file concurrently using parallel workers.
    
    test.describe.configure({ mode: &#39;parallel&#39; });
    
    test(&#39;runs in parallel 1&#39;, async ({ page }) =&gt; {});
    
    test(&#39;runs in parallel 2&#39;, async ({ page }) =&gt; {});
    
    `

  * Running tests in order, retrying each failed test independently.

This is the default mode. It can be useful to set it explicitly to override project configuration that uses `fullyParallel`.
    
    `
    
    // Tests in this file run in order. Retries, if any, run independently.
    
    test.describe.configure({ mode: &#39;default&#39; });
    
    test(&#39;runs first&#39;, async ({ page }) =&gt; {});
    
    test(&#39;reset user settings&#39;, async ({ page }) =&gt; {});
    
    `

  * Run multiple describes in parallel, but tests inside each describe in order.
    
    `
    
    test.describe.configure({ mode: &#39;parallel&#39; });
    
    test.describe(&#39;A, runs in parallel with B&#39;, () =&gt; {
    
      test.describe.configure({ mode: &#39;default&#39; });
    
      test(&#39;in order A1&#39;, async ({ page }) =&gt; {});
    
      test(&#39;in order A2&#39;, async ({ page }) =&gt; {});
    
    });
    
    test.describe(&#39;B, runs in parallel with A&#39;, () =&gt; {
    
      test.describe.configure({ mode: &#39;default&#39; });
    
      test(&#39;in order B1&#39;, async ({ page }) =&gt; {});
    
      test(&#39;in order B2&#39;, …[truncated]</excerpt>
</source>
<source kind="search">
<title>TestProject | Playwright</title>
<location>https://playwright.dev/docs/api/class-testproject</location>
<excerpt>citeturn0search1 [wordlim: 200] Crawled: 4 days ago; Playwright Test runs tests in parallel. ... You can configure entire test project to concurrently run all tests in all files using this option. ... The regular expression will be tested against the string that consists of the project name, the test file name, the `test.describe` name (if any), the test name and the test tags divided by spaces, e.g. `chromium my-test.spec.ts my-suite my-test`. ... See testConfig.workers for the default of the total worker limit.

### fullyParallel​

Added in: v1.10 testProject.fullyParallel

Playwright Test runs tests in parallel. In order to achieve that, it runs several worker processes that run at the same time. By default, test files are run in parallel. Tests in a single file are run in order, in the same worker process.

You can configure entire test project to concurrently run all tests in all files using this option.

Usage
    
    `
    
    testProject.fullyParallel
    
    `

Type

  * boolean

* * *

### grep​

Added in: v1.10 testProject.grep

Filter to only run tests with a title matching one of the patterns. For example, passing `grep: /cart/` should only run tests with &quot;cart&quot; in the title. Also available globally and in the command line with the `-g` option. The regular expression will be tested against the string that consists of the project name, the test file name, the `test.describe` name (if any), the test name and the test tags divided by spaces, e.g. `chromium my-test.spec.ts my-suite my-test`.
</excerpt>
</source>
<source kind="search">
<title>Parallelism | Playwright</title>
<location>https://playwright.dev/docs/next/test-parallel</location>
<excerpt>citeturn0search2 [wordlim: 200] Crawled: last month; Playwright Test reuses a single worker as much as it can to make testing faster, so multiple test files are usually run in a single worker one after another. ... Each test executes all relevant hooks just for itself, including `beforeAll` and `afterAll`. ...     test.describe.configure({ mode: &#39;parallel&#39; }); ... Alternatively, you can opt-in all tests into this fully-parallel mode in the configuration file: ... There is no guarantee about the order of test execution across the files, because Playwright Test runs test files in parallel by default.

Version: Next

[Button: On this page]

# Parallelism

## Introduction​

Playwright Test runs tests in parallel. In order to achieve that, it runs several worker processes that run at the same time. By default, test files are run in parallel. Tests in a single file are run in order, in the same worker process.

  * You can configure tests using `test.describe.configure` to run tests in a single file in parallel.
  * You can configure entire project to have all tests in all files to run in parallel using testProject.fullyParallel or testConfig.fullyParallel.
  * To disable parallelism limit the number of workers to one.

You can control the number of parallel worker processes and limit the number of failures in the whole test suite for efficiency.

## Worker processes​

All tests run in worker processes. These processes are OS processes, running independently, orchestrated by the test runner. All workers have identical environments and each starts its own browser.
    
    `
    
    npx playwright test --workers=1
    
    `

## Parallelize tests in a single file​

By default, tests in a single file are run in order. If you have many independent tests in a single file, you might want to run them in parallel with test.describe.configure().

Note that parallel tests are executed in separate worker processes and cannot share any state or global variables. Each test executes all relevant hooks just for itself, including `beforeAll` and `afterAll`.
    
    `
    
    import { test } from &#39;@playwright/test&#39;;
    
    test.describe.configure({ mode: &#39;parallel&#39; });
    
    test(&#39;runs in parallel 1&#39;, async ({ page }) =&gt; { /* ... */ });
    
    test(&#39;runs in parallel 2&#39;, async ({ page }) =&gt; { /* ... */ });
    
    `

Alternatively, you can opt-in all tests into this fully-parallel mode in the configuration file:

playwright.config.ts
    
    `
    
    import { defineConfig } from &#39;@playwright/test&#39;;
    
    export default defineConfig({
    
      fullyParallel: true,
    
    });
    
    `

You can also opt in for fully-parallel mode for just a few projects:

playwright.config.ts
    
    `
    
    import { defineConfig } from &#39;@playwright/test&#39;;
    
    export default defineConfig({
    
      // runs all tests in all files of a specific project in parallel
    
      projects: [
    
        {
    
          name: &#39;chromium&#39;,
    
          use: { ...devices[&#39;Desktop Chrome&#39;] },
    
          fullyParallel: true,
    
        },
    
      ]
    
    });
    
    `

## Opt out of fully parallel mode​

If your configuration applies parallel mode to all tests using testConfig.fullyParallel, you might still want to run some tests with default settings. You can override the mode per describe:
    
    `
    
    test.describe(&#39;runs in parallel with other describes&#39;, () =&gt; {
    
      test.describe.configure({ mode: &#39;default&#39; });
    
      test(&#39;in order 1&#39;, async ({ page }) =&gt; {});
    
      test(&#39;in order 2&#39;, async ({ page }) =&gt; {});
    
    });
    
    `

## Avoiding shared state in parallel tests​

Playwright runs tests in separate worker processes, each with its own isolated BrowserContext, so cookies, storage and in-memory globals are already isolated. Flakiness comes from state that lives o…[truncated]</excerpt>
</source>
<source kind="search">
<title>Configuration | Playwright</title>
<location>https://playwright.dev/docs/test-configuration</location>
<excerpt>citeturn0search3 [wordlim: 200] Crawled: 4 days ago; Playwright has many options to configure how your tests are run. ...     import { defineConfig, devices } from &#39;@playwright/test&#39;; ...       // Look for test files in the &quot;tests&quot; directory, relative to this configuration file. ...       // Run your local dev server before starting the tests. ... testConfig.fullyParallel  | have all tests in all files to run in parallel. ... testConfig.workers  | The maximum number of concurrent worker processes to use for parallelizing tests.

# Configuration

## Introduction​

Playwright has many options to configure how your tests are run. You can specify these options in the configuration file. Note that test runner options are top-level, do not put them into the `use` section.

## Basic Configuration​

Here are some of the most common configuration options.
    
    `
    
    import { defineConfig, devices } from &#39;@playwright/test&#39;;
    
    export default defineConfig({
    
      // Look for test files in the &quot;tests&quot; directory, relative to this configuration file.
    
      testDir: &#39;tests&#39;,
    
      // Run all tests in parallel.
    
      fullyParallel: true,
    
      // Fail the build on CI if you accidentally left test.only in the source code.
    
      forbidOnly: !!process.env.CI,
    
      // Retry on CI only.
    
      retries: process.env.CI ? 2 : 0,
    
      // Opt out of parallel tests on CI.
    
      workers: process.env.CI ? 1 : undefined,
    
      // Limit the whole test run, so that it fails with a report instead of hanging.
    
      globalTimeout: 60 * 60 * 1000,
    
      // Reporter to use
    
      reporter: &#39;html&#39;,
    
      use: {
    
        // Base URL to use in actions like `await page.goto(&#39;/&#39;)`.
    
        baseURL: &#39;http://localhost:3000&#39;,
    
        // Collect trace when retrying the failed test.
    
        trace: &#39;on-first-retry&#39;,
    
      },
    
      // Configure projects for major browsers.
    
      projects: [
    
        {
    
          name: &#39;chromium&#39;,
    
          use: { ...devices[&#39;Desktop Chrome&#39;] },
    
        },
    
      ],
    
      // Run your local dev server before starting the tests.
    
      webServer: {
    
        command: &#39;npm run start&#39;,
    
        url: &#39;http://localhost:3000&#39;,
    
        reuseExistingServer: !process.env.CI,
    
      },
    
    });
    
    `

Option  | Description
--- | ---
testConfig.forbidOnly  | Whether to exit with an error if any tests are marked as `test.only`. Useful on CI.
testConfig.fullyParallel  | have all tests in all files to run in parallel. See Parallelism and Sharding for more details.
testConfig.globalTimeout  | Maximum time the whole test run can take. When reached, Playwright stops the run and reporters still produce a report. See Timeouts to learn more.
testConfig.projects  | Run tests in multiple configurations or on multiple browsers
testConfig.reporter  | Reporter to use. See Test Reporters to learn more about which reporters are available.
testConfig.retries  | The maximum number of retry attempts per test. See Test Retries to learn more about retries.
testConfig.testDir  | Directory with the test files.
testConfig.use  | Options with `use{}`
testConfig.webServer  | To launch a server during the tests, use the `webServer` option
testConfig.workers  | The maximum number of concurrent worker processes to use for parallelizing tests. Can also be set as percentage of logical CPU cores, e.g. `&#39;50%&#39;.`. See Parallelism and Sharding for more details.
</excerpt>
</source>
<source kind="search">
<title>playwright/packages/playwright/src/program.ts at main · microsoft/playwright · GitHub</title>
<location>https://github.com/microsoft/playwright/blob/main/packages/playwright/src/program.ts</location>
<excerpt>citeturn0search4 [wordlim: 200] Crawled: last week; [&#39;--debug [mode]&#39;, { description: `Run tests with Playwright Inspector.Shortcut for &quot;PWDEBUG=1&quot; environment variable and &quot;--timeout=0 --max-failures=1 --headed --workers=1&quot; options`, choices: [&#39;inspector&#39;, &#39;cli&#39;], preset: &#39;inspector&#39; }], ... [&#39;--fully-parallel&#39;, { description: `Run all tests in parallel (default: false)` }],
[&#39;--add-reporter &lt;reporter&gt;&#39;, { description: `Reporter to add on top of the configured reporters, comma-separated, can be ${builtInReporters.map(name =&gt; `&quot;${name}&quot;`).join(&#39;, &#39;)} or a path to a reporter module` }],

/* deprecated */ [&#39;--browser &lt;browser&gt;&#39;, { description: `Browser to use for tests, one of &quot;all&quot;, &quot;chromium&quot;, &quot;firefox&quot; or &quot;webkit&quot; (default: &quot;chromium&quot;)` }],

[&#39;-c, --config &lt;file&gt;&#39;, { description: `Configuration file, or a test directory with optional &quot;playwright.config.{m,c}?{js,ts}&quot;` }],

[&#39;--debug [mode]&#39;, { description: `Run tests with Playwright Inspector. Shortcut for &quot;PWDEBUG=1&quot; environment variable and &quot;--timeout=0 --max-failures=1 --headed --workers=1&quot; options`, choices: [&#39;inspector&#39;, &#39;cli&#39;], preset: &#39;inspector&#39; }],

[&#39;--fail-on-flaky-tests&#39;, { description: `Fail if any test is flagged as flaky (default: false)` }],

[&#39;--forbid-only&#39;, { description: `Fail if test.only is called (default: false)` }],

[&#39;--fully-parallel&#39;, { description: `Run all tests in parallel (default: false)` }],

[&#39;--global-timeout &lt;timeout&gt;&#39;, { description: `Maximum time this test suite can run in milliseconds (default: unlimited)` }],

[&#39;-g, --grep &lt;grep&gt;&#39;, { description: `Only run tests matching this regular expression (default: &quot;.*&quot;)` }],

[&#39;-G, --grep-invert &lt;grep&gt;&#39;, { description: `Only run tests that do not match this regular expression` }],

[&#39;--headed&#39;, { description: `Run tests in headed browsers (default: headless)` }],

[&#39;--ignore-snapshots&#39;, { description: `Ignore screenshot and snapshot expectations` }],

[&#39;--last-failed&#39;, { description: `Only re-run the failures` }],

[&#39;--last-failed-file &lt;file&gt;&#39;, { description: `Override the default path for the last-run JSON file used with --last-failed (default: &lt;outputDir&gt;/.last-run.json). Same as PLAYWRIGHT_LAST_RUN_OUTPUT_FILE environment variable.` }],

[&#39;--list&#39;, { description: `Collect all the tests and report them, but do not run` }],

[&#39;--max-failures &lt;N&gt;&#39;, { description: `Stop after the first N failures` }],

</excerpt>
</source>
<omitted_sources count="7">Additional source records were omitted from this bounded result.</omitted_sources>
</source_evidence>

Citations:

- 1: https://playwright.dev/docs/api/class-test?utm_source=openai
- 2: https://playwright.dev/docs/api/class-test?utm_source=openai

Run each presentation’s steps in the same page.

fullyParallel: true gives each step test its own beforeAll and afterAll lifecycle. workers: 1 limits concurrency but does not restore page reuse. The suite defines 79 step tests, including 72 steps across multi-step presentations, so this repeatedly reloads presentations instead of reusing one page per presentation.

Proposed change
     test.describe(`${relDir}/${entry}`, () => {
+        test.describe.configure({ mode: 'default' });
         // The presentation is loaded once, and each test moves it to its step.

@panglesd
panglesd merged commit e3eb081 into main Oct 25, 2026
10 checks passed
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