Skip to content

Refactor: remove Rust CLI and implement Playwright repo generation in Starlark#3

Merged
benfdking merged 9 commits into
mainfrom
spike-starlark-no-rust
May 17, 2026
Merged

Refactor: remove Rust CLI and implement Playwright repo generation in Starlark#3
benfdking merged 9 commits into
mainfrom
spike-starlark-no-rust

Conversation

@benfdking
Copy link
Copy Markdown

Summary\nThis PR removes the Rust CLI/toolchain dependency and replaces its behavior with Starlark implementations.\n\n## What changed\n- Replaced Rust-driven browser target expansion and workspace file generation with \n- Rewired and to stop invoking CLI binaries\n- Replaced Rust UnZip 6.00 of 20 April 2009, by Info-ZIP, with modifications by Apple Inc.

Please report bugs to Apple.

Usage: unzip [-Z] [-opts[modifiers]] file[.zip] [list] [-x xlist] [-d exdir]
Default action is to extract files in list, except those in xlist, to exdir;
file[.zip] may be a wildcard. -Z => ZipInfo mode ("unzip -Z" for usage).

-p extract files to pipe, no messages -l list files (short format)
-f freshen existing files, create none -t test compressed archive data
-u update files, create if necessary -z display archive comment only
-v list verbosely/show version info -T timestamp archive to latest
-x exclude files that follow (in xlist) -d extract files into exdir
modifiers:
-n never overwrite existing files -q quiet mode (-qq => quieter)
-o overwrite files WITHOUT prompting -a auto-convert any text files
-j junk paths (do not make directories) -aa treat ALL files as text
-C match filenames case-insensitively -L make (some) names lowercase
-X restore UID/GID info -V retain VMS version numbers
-K keep setuid/setgid/tacky permissions -M pipe through "more" pager
See "unzip -hh" or unzip.txt for more help. Examples:
unzip data1 -x joe => extract all files except joe from zipfile data1.zip
unzip -p foo | more => send contents of foo.zip via pipe into program more
unzip -fo foo ReadMe => quietly replace existing ReadMe if archive file newer command usage with unzip in \n- Replaced Rust command usage with hashing in \n- Removed Rust dependency/toolchain/crate-universe setup from \n- Removed Rust workspace and CLI source files (, , Rust files under )\n- Kept as exported data via \n- Updated bzl_library wiring for docs extraction\n\n## Validation\n- (repo root): build/analysis succeeds (no test targets defined at root)\n- ==================== Test output for //:test:
/private/var/tmp/_bazel_ben/7697b1971f43197a289c81160f290b6c/execroot/main/bazel-out/darwin_arm64-fastbuild/bin/test/test.runfiles/main test-server/test-server

Running 78 tests using 1 worker

/private/var/tmp/_bazel_ben/7697b1971f43197a289c81160f290b6c/execroot/main/bazel-out/darwin_arm64-fastbuild/bin/test/test.runfiles/main test-server/test-server
[WebServer] (node:88548) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
[WebServer] (Use node --trace-deprecation ... to show where the warning was created)
✓ 1 [chromium] › tests/example.spec.ts:19:7 › New Todo › should allow me to add todo items (127ms)
✓ 2 [chromium] › tests/example.spec.ts:42:7 › New Todo › should clear text input field when an item is added (105ms)
✓ 3 [chromium] › tests/example.spec.ts:57:7 › New Todo › should append new items to the bottom of the list (116ms)
✓ 4 [chromium] › tests/example.spec.ts:74:7 › New Todo › should show #main and #footer when items added (100ms)
✓ 5 [chromium] › tests/example.spec.ts:97:7 › Mark all as completed › should allow me to mark all items as completed (128ms)
✓ 6 [chromium] › tests/example.spec.ts:110:7 › Mark all as completed › should allow me to clear the complete state of all items (151ms)
✓ 7 [chromium] › tests/example.spec.ts:122:7 › Mark all as completed › complete all checkbox should update state when items are completed / cleared (161ms)
✓ 8 [chromium] › tests/example.spec.ts:146:7 › Item › should allow me to mark items as complete (144ms)
✓ 9 [chromium] › tests/example.spec.ts:171:7 › Item › should allow me to un-mark items as complete (163ms)
✓ 10 [chromium] › tests/example.spec.ts:194:7 › Item › should allow me to edit an item (138ms)
✓ 11 [chromium] › tests/example.spec.ts:224:7 › Editing › should hide other controls when editing (128ms)
✓ 12 [chromium] › tests/example.spec.ts:236:7 › Editing › should save edits on blur (142ms)
✓ 13 [chromium] › tests/example.spec.ts:256:7 › Editing › should trim entered text (153ms)
✓ 14 [chromium] › tests/example.spec.ts:276:7 › Editing › should remove the item if an empty text string was entered (152ms)
✓ 15 [chromium] › tests/example.spec.ts:290:7 › Editing › should cancel edits on escape (154ms)
✓ 16 [chromium] › tests/example.spec.ts:306:7 › Counter › should display the current number of todo items (114ms)
✓ 17 [chromium] › tests/example.spec.ts:327:7 › Clear completed button › should display the correct text (118ms)
✓ 18 [chromium] › tests/example.spec.ts:334:7 › Clear completed button › should remove completed items when clicked (140ms)
✓ 19 [chromium] › tests/example.spec.ts:342:7 › Clear completed button › should be hidden when there are no items that are completed (135ms)
✓ 20 [chromium] › tests/example.spec.ts:354:7 › Persistence › should persist its data (149ms)
✓ 21 [chromium] › tests/example.spec.ts:387:7 › Routing › should allow me to display active items (250ms)
✓ 22 [chromium] › tests/example.spec.ts:398:7 › Routing › should respect the back button (296ms)
✓ 23 [chromium] › tests/example.spec.ts:422:7 › Routing › should allow me to display completed items (251ms)
✓ 24 [chromium] › tests/example.spec.ts:429:7 › Routing › should allow me to display all items (308ms)
✓ 25 [chromium] › tests/example.spec.ts:438:7 › Routing › should highlight the currently applied filter (337ms)
✘ 26 [chromium] › tests/snapshots.spec.ts:19:7 › Snapshots › should look great (395ms)
/private/var/tmp/_bazel_ben/7697b1971f43197a289c81160f290b6c/execroot/main/bazel-out/darwin_arm64-fastbuild/bin/test/test.runfiles/main test-server/test-server
✘ 27 [chromium] › tests/snapshots.spec.ts:19:7 › Snapshots › should look great (retry #1) (436ms)
/private/var/tmp/_bazel_ben/7697b1971f43197a289c81160f290b6c/execroot/main/bazel-out/darwin_arm64-fastbuild/bin/test/test.runfiles/main test-server/test-server
✘ 28 [chromium] › tests/snapshots.spec.ts:19:7 › Snapshots › should look great (retry #2) (396ms)
/private/var/tmp/_bazel_ben/7697b1971f43197a289c81160f290b6c/execroot/main/bazel-out/darwin_arm64-fastbuild/bin/test/test.runfiles/main test-server/test-server
✓ 29 [firefox] › tests/example.spec.ts:19:7 › New Todo › should allow me to add todo items (566ms)
✓ 30 [firefox] › tests/example.spec.ts:42:7 › New Todo › should clear text input field when an item is added (206ms)
✓ 31 [firefox] › tests/example.spec.ts:57:7 › New Todo › should append new items to the bottom of the list (243ms)
✓ 32 [firefox] › tests/example.spec.ts:74:7 › New Todo › should show #main and #footer when items added (182ms)
✓ 33 [firefox] › tests/example.spec.ts:97:7 › Mark all as completed › should allow me to mark all items as completed (221ms)
✓ 34 [firefox] › tests/example.spec.ts:110:7 › Mark all as completed › should allow me to clear the complete state of all items (250ms)
✓ 35 [firefox] › tests/example.spec.ts:122:7 › Mark all as completed › complete all checkbox should update state when items are completed / cleared (278ms)
✓ 36 [firefox] › tests/example.spec.ts:146:7 › Item › should allow me to mark items as complete (240ms)
✓ 37 [firefox] › tests/example.spec.ts:171:7 › Item › should allow me to un-mark items as complete (270ms)
✓ 38 [firefox] › tests/example.spec.ts:194:7 › Item › should allow me to edit an item (248ms)
✓ 39 [firefox] › tests/example.spec.ts:224:7 › Editing › should hide other controls when editing (295ms)
✓ 40 [firefox] › tests/example.spec.ts:236:7 › Editing › should save edits on blur (223ms)
✓ 41 [firefox] › tests/example.spec.ts:256:7 › Editing › should trim entered text (231ms)
✓ 42 [firefox] › tests/example.spec.ts:276:7 › Editing › should remove the item if an empty text string was entered (225ms)
✓ 43 [firefox] › tests/example.spec.ts:290:7 › Editing › should cancel edits on escape (229ms)
✓ 44 [firefox] › tests/example.spec.ts:306:7 › Counter › should display the current number of todo items (185ms)
✓ 45 [firefox] › tests/example.spec.ts:327:7 › Clear completed button › should display the correct text (213ms)
✓ 46 [firefox] › tests/example.spec.ts:334:7 › Clear completed button › should remove completed items when clicked (244ms)
✓ 47 [firefox] › tests/example.spec.ts:342:7 › Clear completed button › should be hidden when there are no items that are completed (234ms)
✓ 48 [firefox] › tests/example.spec.ts:354:7 › Persistence › should persist its data (378ms)
✓ 49 [firefox] › tests/example.spec.ts:387:7 › Routing › should allow me to display active items (257ms)
✓ 50 [firefox] › tests/example.spec.ts:398:7 › Routing › should respect the back button (314ms)
✓ 51 [firefox] › tests/example.spec.ts:422:7 › Routing › should allow me to display completed items (257ms)
✓ 52 [firefox] › tests/example.spec.ts:429:7 › Routing › should allow me to display all items (302ms)
✓ 53 [firefox] › tests/example.spec.ts:438:7 › Routing › should highlight the currently applied filter (262ms)
✘ 54 [firefox] › tests/snapshots.spec.ts:19:7 › Snapshots › should look great (447ms)
/private/var/tmp/_bazel_ben/7697b1971f43197a289c81160f290b6c/execroot/main/bazel-out/darwin_arm64-fastbuild/bin/test/test.runfiles/main test-server/test-server
✘ 55 [firefox] › tests/snapshots.spec.ts:19:7 › Snapshots › should look great (retry #1) (805ms)
/private/var/tmp/_bazel_ben/7697b1971f43197a289c81160f290b6c/execroot/main/bazel-out/darwin_arm64-fastbuild/bin/test/test.runfiles/main test-server/test-server
✘ 56 [firefox] › tests/snapshots.spec.ts:19:7 › Snapshots › should look great (retry #2) (797ms)
/private/var/tmp/_bazel_ben/7697b1971f43197a289c81160f290b6c/execroot/main/bazel-out/darwin_arm64-fastbuild/bin/test/test.runfiles/main test-server/test-server
✓ 57 [webkit] › tests/example.spec.ts:19:7 › New Todo › should allow me to add todo items (304ms)
✓ 58 [webkit] › tests/example.spec.ts:42:7 › New Todo › should clear text input field when an item is added (188ms)
✓ 59 [webkit] › tests/example.spec.ts:57:7 › New Todo › should append new items to the bottom of the list (179ms)
✓ 60 [webkit] › tests/example.spec.ts:74:7 › New Todo › should show #main and #footer when items added (162ms)
✓ 61 [webkit] › tests/example.spec.ts:97:7 › Mark all as completed › should allow me to mark all items as completed (212ms)
✓ 62 [webkit] › tests/example.spec.ts:110:7 › Mark all as completed › should allow me to clear the complete state of all items (241ms)
✓ 63 [webkit] › tests/example.spec.ts:122:7 › Mark all as completed › complete all checkbox should update state when items are completed / cleared (270ms)
✓ 64 [webkit] › tests/example.spec.ts:146:7 › Item › should allow me to mark items as complete (220ms)
✓ 65 [webkit] › tests/example.spec.ts:171:7 › Item › should allow me to un-mark items as complete (243ms)
✓ 66 [webkit] › tests/example.spec.ts:194:7 › Item › should allow me to edit an item (211ms)
✓ 67 [webkit] › tests/example.spec.ts:224:7 › Editing › should hide other controls when editing (205ms)
✓ 68 [webkit] › tests/example.spec.ts:236:7 › Editing › should save edits on blur (207ms)
✓ 69 [webkit] › tests/example.spec.ts:256:7 › Editing › should trim entered text (221ms)
✓ 70 [webkit] › tests/example.spec.ts:276:7 › Editing › should remove the item if an empty text string was entered (210ms)
✓ 71 [webkit] › tests/example.spec.ts:290:7 › Editing › should cancel edits on escape (219ms)
✓ 72 [webkit] › tests/example.spec.ts:306:7 › Counter › should display the current number of todo items (169ms)
✓ 73 [webkit] › tests/example.spec.ts:327:7 › Clear completed button › should display the correct text (193ms)
✓ 74 [webkit] › tests/example.spec.ts:334:7 › Clear completed button › should remove completed items when clicked (226ms)
✓ 75 [webkit] › tests/example.spec.ts:342:7 › Clear completed button › should be hidden when there are no items that are completed (230ms)
✓ 76 [webkit] › tests/example.spec.ts:354:7 › Persistence › should persist its data (211ms)
✓ 77 [webkit] › tests/example.spec.ts:387:7 › Routing › should allow me to display active items (236ms)
✓ 78 [webkit] › tests/example.spec.ts:398:7 › Routing › should respect the back button (305ms)
✓ 79 [webkit] › tests/example.spec.ts:422:7 › Routing › should allow me to display completed items (239ms)
✓ 80 [webkit] › tests/example.spec.ts:429:7 › Routing › should allow me to display all items (312ms)
✓ 81 [webkit] › tests/example.spec.ts:438:7 › Routing › should highlight the currently applied filter (257ms)
✘ 82 [webkit] › tests/snapshots.spec.ts:19:7 › Snapshots › should look great (430ms)
/private/var/tmp/_bazel_ben/7697b1971f43197a289c81160f290b6c/execroot/main/bazel-out/darwin_arm64-fastbuild/bin/test/test.runfiles/main test-server/test-server
✘ 83 [webkit] › tests/snapshots.spec.ts:19:7 › Snapshots › should look great (retry #1) (628ms)
/private/var/tmp/_bazel_ben/7697b1971f43197a289c81160f290b6c/execroot/main/bazel-out/darwin_arm64-fastbuild/bin/test/test.runfiles/main test-server/test-server
✘ 84 [webkit] › tests/snapshots.spec.ts:19:7 › Snapshots › should look great (retry #2) (550ms)

  1. [chromium] › tests/snapshots.spec.ts:19:7 › Snapshots › should look great ─────────────────────
Error: expect(page).toHaveScreenshot(expected) failed

  1266 pixels (ratio 0.01 of all image pixels) are different.

  Snapshot: loaded.png

Call log:
  - Expect "toHaveScreenshot(loaded.png)" with timeout 5000ms
    - verifying given screenshot expectation
  - taking page screenshot
    - disabled all CSS animations
  - waiting for fonts to load...
  - fonts loaded
  - 1266 pixels (ratio 0.01 of all image pixels) are different.
  - waiting 100ms before taking screenshot
  - taking page screenshot
    - disabled all CSS animations
  - waiting for fonts to load...
  - fonts loaded
  - captured a stable screenshot
  - 1266 pixels (ratio 0.01 of all image pixels) are different.


  18 | test.describe("Snapshots", () => {
  19 |   test("should look great", async ({ page }) => {
> 20 |     await expect(page).toHaveScreenshot("loaded.png");
     |                        ^
  21 |   });
  22 | });
  23 |
    at /private/var/tmp/_bazel_ben/7697b1971f43197a289c81160f290b6c/execroot/_main/bazel-out/darwin_arm64-fastbuild/bin/test_/test.runfiles/_main/tests/snapshots.spec.ts:20:24

attachment #1: loaded (image/png) ──────────────────────────────────────────────────────────────
Expected: tests/snapshots.spec.ts-snapshots/loaded-chromium-darwin.png
Received: test-results/snapshots-Snapshots-should-look-great-chromium/loaded-actual.png
Diff:     test-results/snapshots-Snapshots-should-look-great-chromium/loaded-diff.png
────────────────────────────────────────────────────────────────────────────────────────────────

Error Context: test-results/snapshots-Snapshots-should-look-great-chromium/error-context.md

Retry #1 ───────────────────────────────────────────────────────────────────────────────────────

Error: expect(page).toHaveScreenshot(expected) failed

  1266 pixels (ratio 0.01 of all image pixels) are different.

  Snapshot: loaded.png

Call log:
  - Expect "toHaveScreenshot(loaded.png)" with timeout 5000ms
    - verifying given screenshot expectation
  - taking page screenshot
    - disabled all CSS animations
  - waiting for fonts to load...
  - fonts loaded
  - 1266 pixels (ratio 0.01 of all image pixels) are different.
  - waiting 100ms before taking screenshot
  - taking page screenshot
    - disabled all CSS animations
  - waiting for fonts to load...
  - fonts loaded
  - captured a stable screenshot
  - 1266 pixels (ratio 0.01 of all image pixels) are different.


  18 | test.describe("Snapshots", () => {
  19 |   test("should look great", async ({ page }) => {
> 20 |     await expect(page).toHaveScreenshot("loaded.png");
     |                        ^
  21 |   });
  22 | });
  23 |
    at /private/var/tmp/_bazel_ben/7697b1971f43197a289c81160f290b6c/execroot/_main/bazel-out/darwin_arm64-fastbuild/bin/test_/test.runfiles/_main/tests/snapshots.spec.ts:20:24

attachment #1: loaded (image/png) ──────────────────────────────────────────────────────────────
Expected: tests/snapshots.spec.ts-snapshots/loaded-chromium-darwin.png
Received: test-results/snapshots-Snapshots-should-look-great-chromium-retry1/loaded-actual.png
Diff:     test-results/snapshots-Snapshots-should-look-great-chromium-retry1/loaded-diff.png
────────────────────────────────────────────────────────────────────────────────────────────────

Error Context: test-results/snapshots-Snapshots-should-look-great-chromium-retry1/error-context.md

attachment #3: trace (application/zip) ─────────────────────────────────────────────────────────
test-results/snapshots-Snapshots-should-look-great-chromium-retry1/trace.zip
Usage:

    npx playwright show-trace test-results/snapshots-Snapshots-should-look-great-chromium-retry1/trace.zip

────────────────────────────────────────────────────────────────────────────────────────────────

Retry #2 ───────────────────────────────────────────────────────────────────────────────────────

Error: expect(page).toHaveScreenshot(expected) failed

  1266 pixels (ratio 0.01 of all image pixels) are different.

  Snapshot: loaded.png

Call log:
  - Expect "toHaveScreenshot(loaded.png)" with timeout 5000ms
    - verifying given screenshot expectation
  - taking page screenshot
    - disabled all CSS animations
  - waiting for fonts to load...
  - fonts loaded
  - 1266 pixels (ratio 0.01 of all image pixels) are different.
  - waiting 100ms before taking screenshot
  - taking page screenshot
    - disabled all CSS animations
  - waiting for fonts to load...
  - fonts loaded
  - captured a stable screenshot
  - 1266 pixels (ratio 0.01 of all image pixels) are different.


  18 | test.describe("Snapshots", () => {
  19 |   test("should look great", async ({ page }) => {
> 20 |     await expect(page).toHaveScreenshot("loaded.png");
     |                        ^
  21 |   });
  22 | });
  23 |
    at /private/var/tmp/_bazel_ben/7697b1971f43197a289c81160f290b6c/execroot/_main/bazel-out/darwin_arm64-fastbuild/bin/test_/test.runfiles/_main/tests/snapshots.spec.ts:20:24

attachment #1: loaded (image/png) ──────────────────────────────────────────────────────────────
Expected: tests/snapshots.spec.ts-snapshots/loaded-chromium-darwin.png
Received: test-results/snapshots-Snapshots-should-look-great-chromium-retry2/loaded-actual.png
Diff:     test-results/snapshots-Snapshots-should-look-great-chromium-retry2/loaded-diff.png
────────────────────────────────────────────────────────────────────────────────────────────────

Error Context: test-results/snapshots-Snapshots-should-look-great-chromium-retry2/error-context.md
  1. [firefox] › tests/snapshots.spec.ts:19:7 › Snapshots › should look great ──────────────────────
Error: expect(page).toHaveScreenshot(expected) failed

  1679 pixels (ratio 0.01 of all image pixels) are different.

  Snapshot: loaded.png

Call log:
  - Expect "toHaveScreenshot(loaded.png)" with timeout 5000ms
    - verifying given screenshot expectation
  - taking page screenshot
    - disabled all CSS animations
  - waiting for fonts to load...
  - fonts loaded
  - 1679 pixels (ratio 0.01 of all image pixels) are different.
  - waiting 100ms before taking screenshot
  - taking page screenshot
    - disabled all CSS animations
  - waiting for fonts to load...
  - fonts loaded
  - captured a stable screenshot
  - 1679 pixels (ratio 0.01 of all image pixels) are different.


  18 | test.describe("Snapshots", () => {
  19 |   test("should look great", async ({ page }) => {
> 20 |     await expect(page).toHaveScreenshot("loaded.png");
     |                        ^
  21 |   });
  22 | });
  23 |
    at /private/var/tmp/_bazel_ben/7697b1971f43197a289c81160f290b6c/execroot/_main/bazel-out/darwin_arm64-fastbuild/bin/test_/test.runfiles/_main/tests/snapshots.spec.ts:20:24

attachment #1: loaded (image/png) ──────────────────────────────────────────────────────────────
Expected: tests/snapshots.spec.ts-snapshots/loaded-firefox-darwin.png
Received: test-results/snapshots-Snapshots-should-look-great-firefox/loaded-actual.png
Diff:     test-results/snapshots-Snapshots-should-look-great-firefox/loaded-diff.png
────────────────────────────────────────────────────────────────────────────────────────────────

Error Context: test-results/snapshots-Snapshots-should-look-great-firefox/error-context.md

Retry #1 ───────────────────────────────────────────────────────────────────────────────────────

Error: expect(page).toHaveScreenshot(expected) failed

  1679 pixels (ratio 0.01 of all image pixels) are different.

  Snapshot: loaded.png

Call log:
  - Expect "toHaveScreenshot(loaded.png)" with timeout 5000ms
    - verifying given screenshot expectation
  - taking page screenshot
    - disabled all CSS animations
  - waiting for fonts to load...
  - fonts loaded
  - 1679 pixels (ratio 0.01 of all image pixels) are different.
  - waiting 100ms before taking screenshot
  - taking page screenshot
    - disabled all CSS animations
  - waiting for fonts to load...
  - fonts loaded
  - captured a stable screenshot
  - 1679 pixels (ratio 0.01 of all image pixels) are different.


  18 | test.describe("Snapshots", () => {
  19 |   test("should look great", async ({ page }) => {
> 20 |     await expect(page).toHaveScreenshot("loaded.png");
     |                        ^
  21 |   });
  22 | });
  23 |
    at /private/var/tmp/_bazel_ben/7697b1971f43197a289c81160f290b6c/execroot/_main/bazel-out/darwin_arm64-fastbuild/bin/test_/test.runfiles/_main/tests/snapshots.spec.ts:20:24

attachment #1: loaded (image/png) ──────────────────────────────────────────────────────────────
Expected: tests/snapshots.spec.ts-snapshots/loaded-firefox-darwin.png
Received: test-results/snapshots-Snapshots-should-look-great-firefox-retry1/loaded-actual.png
Diff:     test-results/snapshots-Snapshots-should-look-great-firefox-retry1/loaded-diff.png
────────────────────────────────────────────────────────────────────────────────────────────────

Error Context: test-results/snapshots-Snapshots-should-look-great-firefox-retry1/error-context.md

attachment #3: trace (application/zip) ─────────────────────────────────────────────────────────
test-results/snapshots-Snapshots-should-look-great-firefox-retry1/trace.zip
Usage:

    npx playwright show-trace test-results/snapshots-Snapshots-should-look-great-firefox-retry1/trace.zip

────────────────────────────────────────────────────────────────────────────────────────────────

Retry #2 ───────────────────────────────────────────────────────────────────────────────────────

Error: expect(page).toHaveScreenshot(expected) failed

  1679 pixels (ratio 0.01 of all image pixels) are different.

  Snapshot: loaded.png

Call log:
  - Expect "toHaveScreenshot(loaded.png)" with timeout 5000ms
    - verifying given screenshot expectation
  - taking page screenshot
    - disabled all CSS animations
  - waiting for fonts to load...
  - fonts loaded
  - 1679 pixels (ratio 0.01 of all image pixels) are different.
  - waiting 100ms before taking screenshot
  - taking page screenshot
    - disabled all CSS animations
  - waiting for fonts to load...
  - fonts loaded
  - captured a stable screenshot
  - 1679 pixels (ratio 0.01 of all image pixels) are different.


  18 | test.describe("Snapshots", () => {
  19 |   test("should look great", async ({ page }) => {
> 20 |     await expect(page).toHaveScreenshot("loaded.png");
     |                        ^
  21 |   });
  22 | });
  23 |
    at /private/var/tmp/_bazel_ben/7697b1971f43197a289c81160f290b6c/execroot/_main/bazel-out/darwin_arm64-fastbuild/bin/test_/test.runfiles/_main/tests/snapshots.spec.ts:20:24

attachment #1: loaded (image/png) ──────────────────────────────────────────────────────────────
Expected: tests/snapshots.spec.ts-snapshots/loaded-firefox-darwin.png
Received: test-results/snapshots-Snapshots-should-look-great-firefox-retry2/loaded-actual.png
Diff:     test-results/snapshots-Snapshots-should-look-great-firefox-retry2/loaded-diff.png
────────────────────────────────────────────────────────────────────────────────────────────────

Error Context: test-results/snapshots-Snapshots-should-look-great-firefox-retry2/error-context.md
  1. [webkit] › tests/snapshots.spec.ts:19:7 › Snapshots › should look great ───────────────────────
Error: expect(page).toHaveScreenshot(expected) failed

  1227 pixels (ratio 0.01 of all image pixels) are different.

  Snapshot: loaded.png

Call log:
  - Expect "toHaveScreenshot(loaded.png)" with timeout 5000ms
    - verifying given screenshot expectation
  - taking page screenshot
    - disabled all CSS animations
  - waiting for fonts to load...
  - fonts loaded
  - 1227 pixels (ratio 0.01 of all image pixels) are different.
  - waiting 100ms before taking screenshot
  - taking page screenshot
    - disabled all CSS animations
  - waiting for fonts to load...
  - fonts loaded
  - captured a stable screenshot
  - 1227 pixels (ratio 0.01 of all image pixels) are different.


  18 | test.describe("Snapshots", () => {
  19 |   test("should look great", async ({ page }) => {
> 20 |     await expect(page).toHaveScreenshot("loaded.png");
     |                        ^
  21 |   });
  22 | });
  23 |
    at /private/var/tmp/_bazel_ben/7697b1971f43197a289c81160f290b6c/execroot/_main/bazel-out/darwin_arm64-fastbuild/bin/test_/test.runfiles/_main/tests/snapshots.spec.ts:20:24

attachment #1: loaded (image/png) ──────────────────────────────────────────────────────────────
Expected: tests/snapshots.spec.ts-snapshots/loaded-webkit-darwin.png
Received: test-results/snapshots-Snapshots-should-look-great-webkit/loaded-actual.png
Diff:     test-results/snapshots-Snapshots-should-look-great-webkit/loaded-diff.png
────────────────────────────────────────────────────────────────────────────────────────────────

Error Context: test-results/snapshots-Snapshots-should-look-great-webkit/error-context.md

Retry #1 ───────────────────────────────────────────────────────────────────────────────────────

Error: expect(page).toHaveScreenshot(expected) failed

  1227 pixels (ratio 0.01 of all image pixels) are different.

  Snapshot: loaded.png

Call log:
  - Expect "toHaveScreenshot(loaded.png)" with timeout 5000ms
    - verifying given screenshot expectation
  - taking page screenshot
    - disabled all CSS animations
  - waiting for fonts to load...
  - fonts loaded
  - 1227 pixels (ratio 0.01 of all image pixels) are different.
  - waiting 100ms before taking screenshot
  - taking page screenshot
    - disabled all CSS animations
  - waiting for fonts to load...
  - fonts loaded
  - captured a stable screenshot
  - 1227 pixels (ratio 0.01 of all image pixels) are different.


  18 | test.describe("Snapshots", () => {
  19 |   test("should look great", async ({ page }) => {
> 20 |     await expect(page).toHaveScreenshot("loaded.png");
     |                        ^
  21 |   });
  22 | });
  23 |
    at /private/var/tmp/_bazel_ben/7697b1971f43197a289c81160f290b6c/execroot/_main/bazel-out/darwin_arm64-fastbuild/bin/test_/test.runfiles/_main/tests/snapshots.spec.ts:20:24

attachment #1: loaded (image/png) ──────────────────────────────────────────────────────────────
Expected: tests/snapshots.spec.ts-snapshots/loaded-webkit-darwin.png
Received: test-results/snapshots-Snapshots-should-look-great-webkit-retry1/loaded-actual.png
Diff:     test-results/snapshots-Snapshots-should-look-great-webkit-retry1/loaded-diff.png
────────────────────────────────────────────────────────────────────────────────────────────────

Error Context: test-results/snapshots-Snapshots-should-look-great-webkit-retry1/error-context.md

attachment #3: trace (application/zip) ─────────────────────────────────────────────────────────
test-results/snapshots-Snapshots-should-look-great-webkit-retry1/trace.zip
Usage:

    npx playwright show-trace test-results/snapshots-Snapshots-should-look-great-webkit-retry1/trace.zip

────────────────────────────────────────────────────────────────────────────────────────────────

Retry #2 ───────────────────────────────────────────────────────────────────────────────────────

Error: expect(page).toHaveScreenshot(expected) failed

  1227 pixels (ratio 0.01 of all image pixels) are different.

  Snapshot: loaded.png

Call log:
  - Expect "toHaveScreenshot(loaded.png)" with timeout 5000ms
    - verifying given screenshot expectation
  - taking page screenshot
    - disabled all CSS animations
  - waiting for fonts to load...
  - fonts loaded
  - 1227 pixels (ratio 0.01 of all image pixels) are different.
  - waiting 100ms before taking screenshot
  - taking page screenshot
    - disabled all CSS animations
  - waiting for fonts to load...
  - fonts loaded
  - captured a stable screenshot
  - 1227 pixels (ratio 0.01 of all image pixels) are different.


  18 | test.describe("Snapshots", () => {
  19 |   test("should look great", async ({ page }) => {
> 20 |     await expect(page).toHaveScreenshot("loaded.png");
     |                        ^
  21 |   });
  22 | });
  23 |
    at /private/var/tmp/_bazel_ben/7697b1971f43197a289c81160f290b6c/execroot/_main/bazel-out/darwin_arm64-fastbuild/bin/test_/test.runfiles/_main/tests/snapshots.spec.ts:20:24

attachment #1: loaded (image/png) ──────────────────────────────────────────────────────────────
Expected: tests/snapshots.spec.ts-snapshots/loaded-webkit-darwin.png
Received: test-results/snapshots-Snapshots-should-look-great-webkit-retry2/loaded-actual.png
Diff:     test-results/snapshots-Snapshots-should-look-great-webkit-retry2/loaded-diff.png
────────────────────────────────────────────────────────────────────────────────────────────────

Error Context: test-results/snapshots-Snapshots-should-look-great-webkit-retry2/error-context.md

3 failed
[chromium] › tests/snapshots.spec.ts:19:7 › Snapshots › should look great ──────────────────────
[firefox] › tests/snapshots.spec.ts:19:7 › Snapshots › should look great ───────────────────────
[webkit] › tests/snapshots.spec.ts:19:7 › Snapshots › should look great ────────────────────────
75 passed (28.9s)

//:test FAILED in 29.5s
/private/var/tmp/_bazel_ben/7697b1971f43197a289c81160f290b6c/execroot/_main/bazel-out/darwin_arm64-fastbuild/testlogs/test/test.log

Executed 1 out of 1 test: 1 fails locally.:\n - Functional tests pass\n - Existing platform-specific snapshot diffs remain on macOS (same known issue as before this refactor)\n

@benfdking benfdking merged commit 282f977 into main May 17, 2026
1 check failed
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.

2 participants