Repository navigation
Add screenshot regression test - #286
Conversation
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
Walkthrough
Priority: Severity of issue fixed: Low Merge Risk:
|
There was a problem hiding this comment.
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
Files ignored due to path filters: 161-
test/screenshot-based/action-arguments/screenshots/actions-step-00-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/action-arguments/screenshots/actions-step-00-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/action-arguments/screenshots/actions-step-01-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/action-arguments/screenshots/actions-step-01-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/auto-next/screenshots/auto-next-step-00-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/auto-next/screenshots/auto-next-step-00-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/auto-next/screenshots/auto-next-step-01-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/auto-next/screenshots/auto-next-step-01-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/auto-next/screenshots/auto-next-step-02-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/auto-next/screenshots/auto-next-step-02-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/carousel/screenshots/carousel-step-00-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/carousel/screenshots/carousel-step-00-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/carousel/screenshots/carousel-step-01-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/carousel/screenshots/carousel-step-01-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/carousel/screenshots/carousel-step-02-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/carousel/screenshots/carousel-step-02-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/carousel/screenshots/carousel-step-03-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/carousel/screenshots/carousel-step-03-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/carousel/screenshots/carousel-step-04-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/carousel/screenshots/carousel-step-04-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/carousel/screenshots/carousel-step-05-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/carousel/screenshots/carousel-step-05-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/carousel/screenshots/carousel-step-06-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/carousel/screenshots/carousel-step-06-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/carousel/screenshots/carousel-step-07-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/carousel/screenshots/carousel-step-07-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/carousel/screenshots/carousel-step-08-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/carousel/screenshots/carousel-step-08-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/carousel/screenshots/carousel-step-09-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/carousel/screenshots/carousel-step-09-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/carousel/screenshots/carousel-step-10-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/carousel/screenshots/carousel-step-10-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/carousel/screenshots/carousel-step-11-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/carousel/screenshots/carousel-step-11-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/carousel/screenshots/carousel-step-12-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/carousel/screenshots/carousel-step-12-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/carousel/screenshots/carousel-step-13-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/carousel/screenshots/carousel-step-13-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/carousel/screenshots/carousel-step-14-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/carousel/screenshots/carousel-step-14-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/carousel/screenshots/carousel-step-15-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/carousel/screenshots/carousel-step-15-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/dimension/screenshots/custom-step-00-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/dimension/screenshots/custom-step-00-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/dimension/screenshots/quatre-tiers-step-00-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/dimension/screenshots/quatre-tiers-step-00-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/dimension/screenshots/seize-neuvieme-step-00-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/dimension/screenshots/seize-neuvieme-step-00-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/drawings/screenshots/drawings-step-00-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/drawings/screenshots/drawings-step-00-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/drawings/screenshots/drawings-step-01-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/drawings/screenshots/drawings-step-01-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/drawings/screenshots/drawings-step-02-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/drawings/screenshots/drawings-step-02-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/examples/screenshots/bobkonf-step-00-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/examples/screenshots/bobkonf-step-00-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/examples/screenshots/bobkonf-step-01-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/examples/screenshots/bobkonf-step-01-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/examples/screenshots/bobkonf-step-02-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/examples/screenshots/bobkonf-step-02-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/examples/screenshots/bobkonf-step-03-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/examples/screenshots/bobkonf-step-03-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/examples/screenshots/bobkonf-step-04-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/examples/screenshots/bobkonf-step-04-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/examples/screenshots/bobkonf-step-05-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/examples/screenshots/bobkonf-step-05-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/examples/screenshots/bobkonf-step-80-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/examples/screenshots/bobkonf-step-80-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/examples/screenshots/campus-du-libre-step-00-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/examples/screenshots/campus-du-libre-step-00-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/examples/screenshots/campus-du-libre-step-01-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/examples/screenshots/campus-du-libre-step-01-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/examples/screenshots/campus-du-libre-step-02-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/examples/screenshots/campus-du-libre-step-02-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/examples/screenshots/campus-du-libre-step-03-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/examples/screenshots/campus-du-libre-step-03-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/examples/screenshots/campus-du-libre-step-04-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/examples/screenshots/campus-du-libre-step-04-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/examples/screenshots/campus-du-libre-step-05-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/examples/screenshots/campus-du-libre-step-05-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/highlight-js/screenshots/hljs-step-00-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/highlight-js/screenshots/hljs-step-00-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/math/screenshots/katex-step-00-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/math/screenshots/katex-step-00-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/math/screenshots/mathjax-step-00-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/math/screenshots/mathjax-step-00-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/multi-file/screenshots/main-step-00-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/multi-file/screenshots/main-step-00-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/multi-file/screenshots/main-step-01-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/multi-file/screenshots/main-step-01-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/multi-file/screenshots/main-step-02-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/multi-file/screenshots/main-step-02-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/multi-file/screenshots/main-step-03-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/multi-file/screenshots/main-step-03-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/normal-slides/happy.svgis excluded by!**/*.svgtest/screenshot-based/normal-slides/screenshots/slides-step-00-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/normal-slides/screenshots/slides-step-00-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/normal-slides/screenshots/slides-step-01-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/normal-slides/screenshots/slides-step-01-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/normal-slides/screenshots/slides-step-02-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/normal-slides/screenshots/slides-step-02-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/normal-slides/screenshots/slides-step-03-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/normal-slides/screenshots/slides-step-03-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/normal-slides/screenshots/slides-step-04-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/normal-slides/screenshots/slides-step-04-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/normal-slides/screenshots/slides-step-05-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/normal-slides/screenshots/slides-step-05-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/package-lock.jsonis excluded by!**/package-lock.jsontest/screenshot-based/pdf/screenshots/pdf-step-00-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/pdf/screenshots/pdf-step-00-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/pdf/screenshots/pdf-step-01-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/pdf/screenshots/pdf-step-01-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/pdf/screenshots/pdf-step-02-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/pdf/screenshots/pdf-step-02-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/pdf/screenshots/pdf-step-09-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/pdf/screenshots/pdf-step-09-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/pdf/screenshots/pdf-step-15-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/pdf/screenshots/pdf-step-15-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/pdf/screenshots/pdf-step-19-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/pdf/screenshots/pdf-step-19-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/pdf/screenshots/pdf-step-21-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/pdf/screenshots/pdf-step-21-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/pdf/screenshots/pdf-step-95-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/pdf/screenshots/pdf-step-95-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-00-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-00-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-01-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-01-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-02-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-02-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-03-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-03-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-04-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-04-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-05-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-05-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-06-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-06-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-07-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-07-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-08-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-08-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-09-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-09-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-10-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-10-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-11-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-11-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-12-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-12-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-13-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-13-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-14-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-14-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-15-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-15-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-16-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-16-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/svg/screenshots/svg-step-00-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/svg/screenshots/svg-step-00-firefox-linux.pngis excluded by!**/*.pngtest/screenshot-based/svg/square.svgis excluded by!**/*.svg
Files selected for processing: 39-
.github/workflows/playwright.yml.gitignoretest/README.mdtest/compiler/carousel.t/run.ttest/compiler/highlight-js.t/run.ttest/compiler/normal-slides.t/run.ttest/compiler/svg.t/run.ttest/engine/action-arguments.t/run.ttest/engine/basic.t/new_engine.mdtest/engine/basic.t/run.ttest/screenshot-based/action-arguments/actions.mdtest/screenshot-based/action-arguments/run.jsontest/screenshot-based/auto-next/auto-next.slptest/screenshot-based/auto-next/run.jsontest/screenshot-based/carousel/carousel.mdtest/screenshot-based/carousel/run.jsontest/screenshot-based/cram.spec.jstest/screenshot-based/dimension/custom.slptest/screenshot-based/dimension/quatre-tiers.slptest/screenshot-based/dimension/run.jsontest/screenshot-based/dimension/seize-neuvieme.slptest/screenshot-based/drawings/run.jsontest/screenshot-based/dunetest/screenshot-based/examples/dunetest/screenshot-based/examples/run.jsontest/screenshot-based/highlight-js/hljs.mdtest/screenshot-based/highlight-js/run.jsontest/screenshot-based/math/katex.slptest/screenshot-based/math/mathjax.slptest/screenshot-based/math/run.jsontest/screenshot-based/multi-file/run.jsontest/screenshot-based/normal-slides/run.jsontest/screenshot-based/normal-slides/slides.mdtest/screenshot-based/package.jsontest/screenshot-based/pdf/run.jsontest/screenshot-based/playwright.config.jstest/screenshot-based/slides/run.jsontest/screenshot-based/svg/run.jsontest/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.
-
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

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 winWait for the requested step before capturing the screenshot.
The harness sets readiness when it receives
(payload Ready), then startstoHaveScreenshotimmediately. The parent sendsState (i, Fast)only after receivingReady. 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
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!
There was a problem hiding this comment.
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
Files ignored due to path filters: 71-
test/screenshot-based/action-arguments/screenshots/actions-step-00-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/action-arguments/screenshots/actions-step-01-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/auto-next/screenshots/auto-next-step-00-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/auto-next/screenshots/auto-next-step-01-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/auto-next/screenshots/auto-next-step-02-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/carousel/screenshots/carousel-step-00-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/carousel/screenshots/carousel-step-01-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/carousel/screenshots/carousel-step-02-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/carousel/screenshots/carousel-step-03-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/carousel/screenshots/carousel-step-04-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/carousel/screenshots/carousel-step-05-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/carousel/screenshots/carousel-step-06-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/carousel/screenshots/carousel-step-07-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/carousel/screenshots/carousel-step-08-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/carousel/screenshots/carousel-step-09-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/carousel/screenshots/carousel-step-10-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/carousel/screenshots/carousel-step-11-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/carousel/screenshots/carousel-step-12-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/carousel/screenshots/carousel-step-13-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/carousel/screenshots/carousel-step-14-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/carousel/screenshots/carousel-step-15-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/dimension/screenshots/custom-step-00-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/dimension/screenshots/quatre-tiers-step-00-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/dimension/screenshots/seize-neuvieme-step-00-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/drawings/screenshots/drawings-step-01-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/drawings/screenshots/drawings-step-02-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/examples/screenshots/bobkonf-step-00-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/examples/screenshots/bobkonf-step-01-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/examples/screenshots/bobkonf-step-02-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/examples/screenshots/bobkonf-step-03-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/examples/screenshots/bobkonf-step-04-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/examples/screenshots/bobkonf-step-05-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/examples/screenshots/bobkonf-step-80-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/examples/screenshots/campus-du-libre-step-00-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/examples/screenshots/campus-du-libre-step-01-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/examples/screenshots/campus-du-libre-step-02-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/examples/screenshots/campus-du-libre-step-03-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/examples/screenshots/campus-du-libre-step-04-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/examples/screenshots/campus-du-libre-step-05-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/highlight-js/screenshots/hljs-step-00-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/math/screenshots/katex-step-00-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/multi-file/screenshots/main-step-00-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/multi-file/screenshots/main-step-01-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/multi-file/screenshots/main-step-02-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/multi-file/screenshots/main-step-03-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/normal-slides/screenshots/slides-step-00-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/normal-slides/screenshots/slides-step-01-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/normal-slides/screenshots/slides-step-02-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/normal-slides/screenshots/slides-step-03-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/normal-slides/screenshots/slides-step-04-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/normal-slides/screenshots/slides-step-05-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/pdf/screenshots/pdf-step-00-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/pdf/screenshots/pdf-step-01-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/pdf/screenshots/pdf-step-19-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/pdf/screenshots/pdf-step-21-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-00-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-01-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-02-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-03-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-04-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-05-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-06-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-07-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-08-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-10-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-11-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-12-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-13-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-14-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-15-chromium-linux.pngis excluded by!**/*.pngtest/screenshot-based/slides/screenshots/slides-step-16-chromium-linux.pngis excluded by!**/*.png
Files selected for processing: 4-
CHANGELOG.mdsrc/engine/runtime/universe/universe.csssrc/engine/runtime/universe/window.mltest/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 }) => { |
There was a problem hiding this comment.
🔎 Supported by static analysis
-
Script executed:
cat test/screenshot-based/playwright.config.js sed -n '1,110p' test/screenshot-based/cram.spec.jsRepository: 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 defaultResult:
<source_evidence> <source kind="search"> <title>Playwright Test | Playwright</title> <location>https://playwright.dev/docs/api/class-test</location> <excerpt>citeturn0search0 [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: 'parallel' }); ... 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 '@playwright/test'; test.beforeAll(async () => { console.log('Before tests'); }); test.afterAll(async () => { console.log('After tests'); }); test('my test', async ({ page }) => { // ... }); ` Alternatively, you can declare a hook with a title. example.spec.ts ` test.beforeAll('Setup', async () => { console.log('Before tests'); }); ` 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: 'parallel' }); test('runs in parallel 1', async ({ page }) => {}); test('runs in parallel 2', async ({ page }) => {}); ` * 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: 'default' }); test('runs first', async ({ page }) => {}); test('reset user settings', async ({ page }) => {}); ` * Run multiple describes in parallel, but tests inside each describe in order. ` test.describe.configure({ mode: 'parallel' }); test.describe('A, runs in parallel with B', () => { test.describe.configure({ mode: 'default' }); test('in order A1', async ({ page }) => {}); test('in order A2', async ({ page }) => {}); }); test.describe('B, runs in parallel with A', () => { test.describe.configure({ mode: 'default' }); test('in order B1', async ({ page }) => {}); test('in order B2', …[truncated]</excerpt> </source> <source kind="search"> <title>TestProject | Playwright</title> <location>https://playwright.dev/docs/api/class-testproject</location> <excerpt>citeturn0search1 [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 "cart" 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>citeturn0search2 [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: 'parallel' }); ... 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 '@playwright/test'; test.describe.configure({ mode: 'parallel' }); test('runs in parallel 1', async ({ page }) => { /* ... */ }); test('runs in parallel 2', async ({ page }) => { /* ... */ }); ` Alternatively, you can opt-in all tests into this fully-parallel mode in the configuration file: playwright.config.ts ` import { defineConfig } from '@playwright/test'; 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 '@playwright/test'; export default defineConfig({ // runs all tests in all files of a specific project in parallel projects: [ { name: 'chromium', use: { ...devices['Desktop Chrome'] }, 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('runs in parallel with other describes', () => { test.describe.configure({ mode: 'default' }); test('in order 1', async ({ page }) => {}); test('in order 2', async ({ page }) => {}); }); ` ## 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>citeturn0search3 [wordlim: 200] Crawled: 4 days ago; Playwright has many options to configure how your tests are run. ... import { defineConfig, devices } from '@playwright/test'; ... // Look for test files in the "tests" 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 '@playwright/test'; export default defineConfig({ // Look for test files in the "tests" directory, relative to this configuration file. testDir: 'tests', // 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: 'html', use: { // Base URL to use in actions like `await page.goto('/')`. baseURL: 'http://localhost:3000', // Collect trace when retrying the failed test. trace: 'on-first-retry', }, // Configure projects for major browsers. projects: [ { name: 'chromium', use: { ...devices['Desktop Chrome'] }, }, ], // Run your local dev server before starting the tests. webServer: { command: 'npm run start', url: 'http://localhost:3000', 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. `'50%'.`. 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>citeturn0search4 [wordlim: 200] Crawled: last week; ['--debug [mode]', { description: `Run tests with Playwright Inspector.Shortcut for "PWDEBUG=1" environment variable and "--timeout=0 --max-failures=1 --headed --workers=1" options`, choices: ['inspector', 'cli'], preset: 'inspector' }], ... ['--fully-parallel', { description: `Run all tests in parallel (default: false)` }], ['--add-reporter <reporter>', { description: `Reporter to add on top of the configured reporters, comma-separated, can be ${builtInReporters.map(name => `"${name}"`).join(', ')} or a path to a reporter module` }], /* deprecated */ ['--browser <browser>', { description: `Browser to use for tests, one of "all", "chromium", "firefox" or "webkit" (default: "chromium")` }], ['-c, --config <file>', { description: `Configuration file, or a test directory with optional "playwright.config.{m,c}?{js,ts}"` }], ['--debug [mode]', { description: `Run tests with Playwright Inspector. Shortcut for "PWDEBUG=1" environment variable and "--timeout=0 --max-failures=1 --headed --workers=1" options`, choices: ['inspector', 'cli'], preset: 'inspector' }], ['--fail-on-flaky-tests', { description: `Fail if any test is flagged as flaky (default: false)` }], ['--forbid-only', { description: `Fail if test.only is called (default: false)` }], ['--fully-parallel', { description: `Run all tests in parallel (default: false)` }], ['--global-timeout <timeout>', { description: `Maximum time this test suite can run in milliseconds (default: unlimited)` }], ['-g, --grep <grep>', { description: `Only run tests matching this regular expression (default: ".*")` }], ['-G, --grep-invert <grep>', { description: `Only run tests that do not match this regular expression` }], ['--headed', { description: `Run tests in headed browsers (default: headless)` }], ['--ignore-snapshots', { description: `Ignore screenshot and snapshot expectations` }], ['--last-failed', { description: `Only re-run the failures` }], ['--last-failed-file <file>', { description: `Override the default path for the last-run JSON file used with --last-failed (default: <outputDir>/.last-run.json). Same as PLAYWRIGHT_LAST_RUN_OUTPUT_FILE environment variable.` }], ['--list', { description: `Collect all the tests and report them, but do not run` }], ['--max-failures <N>', { 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.
Implemented with playwright. Adds a node dependency for tests but ok.
Let's see if the CI is properly setup.