"fixed" kicad tests, added baseline screenshots.

This commit is contained in:
Viktor Vaczi 2026-06-10 17:37:58 +02:00
commit d7159b42c0
39 changed files with 29 additions and 14 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 KiB

After

Width:  |  Height:  |  Size: 151 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 KiB

After

Width:  |  Height:  |  Size: 151 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 60 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 60 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 67 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

View file

@ -1,25 +1,33 @@
// Browser bundle entry for the collab e2e: bundles the generic reconciler + Yjs +
// BroadcastChannel transport (from the web frontend) into a single IIFE that the
// pl_editor static harness page can load via <script>. esbuild resolves `yjs` from
// tests/node_modules.
// BroadcastChannel transport (from the web standalone editor) into a single IIFE
// that the pl_editor static harness page can load via <script>. esbuild resolves
// `yjs` from tests/node_modules.
//
// Build: npm run build:collab (tests/) → tests/apps/kicad/collab-bundle.js
import {
startCollab,
type CollabModule,
type CollabWindow,
} from "../../web/apps/frontend/src/wasm/collab/index";
} from "../../web/standalone/src/wasm/collab/index";
// The e2e harness API predates the provider abstraction: specs pass a flat
// { channel, settleMs }. Translate to startCollab's ProviderConfig form here so
// the spec/harness callsites stay stable across web-side API evolution.
function start(
mod: CollabModule,
win: CollabWindow,
opts: { channel: string; settleMs?: number },
): ReturnType<typeof startCollab> {
return startCollab(mod, win, {
provider: { kind: "broadcastchannel", settleMs: opts.settleMs },
room: opts.channel,
});
}
declare global {
interface Window {
KicadCollab?: {
start: (
mod: CollabModule,
win: CollabWindow,
opts: { channel: string; settleMs?: number },
) => ReturnType<typeof startCollab>;
};
KicadCollab?: { start: typeof start };
}
}
window.KicadCollab = { start: startCollab };
window.KicadCollab = { start };

View file

@ -14,6 +14,10 @@ await build({
format: "iife",
outfile: path.join(testsDir, "apps/kicad/collab-bundle.js"),
nodePaths: [path.join(testsDir, "node_modules")],
// The e2e harness only exercises the BroadcastChannel transport; the server
// providers are reached via dynamic import() that never runs in tests, and
// their packages are only installed in the web/ pnpm workspace.
external: ["y-partyserver/provider", "@hocuspocus/provider"],
logLevel: "info",
target: "es2020",
});

View file

@ -13,7 +13,7 @@ import { test, expect } from "./fixtures";
* 2. two-tab — the full loop through the generic reconciler + Yjs + BroadcastChannel:
* a local text insert in tab A appears in tab B, and vice-versa.
*
* The collab reconciler/transport are bundled from web/apps/frontend/src/wasm/collab via
* The collab reconciler/transport are bundled from web/standalone/src/wasm/collab via
* esbuild into apps/kicad/collab-bundle.js (rebuilt in beforeAll for freshness).
*/

View file

@ -67,7 +67,10 @@ export default defineConfig({
testDir: './kicad',
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
// 1 local retry absorbs the known under-parallel-load flakes (same rationale
// as playwright.config.ts): the load-pcb post-load clipboard crash that can
// close the page on Firefox, and the calculator first-run-wizard timing race.
retries: process.env.CI ? 2 : 1,
workers: process.env.CI ? 1 : undefined,
reporter: 'html',
timeout: 180000, // KiCad WASM needs more time to load (3 minutes)