"fixed" kicad tests, added baseline screenshots.
BIN
tests/baseline-screenshots/calculator-before-switch.png
Normal file
|
After Width: | Height: | Size: 106 KiB |
BIN
tests/baseline-screenshots/calculator-color-code.png
Normal file
|
After Width: | Height: | Size: 108 KiB |
BIN
tests/baseline-screenshots/calculator-loaded.png
Normal file
|
After Width: | Height: | Size: 106 KiB |
|
After Width: | Height: | Size: 86 KiB |
|
After Width: | Height: | Size: 89 KiB |
|
After Width: | Height: | Size: 90 KiB |
BIN
tests/baseline-screenshots/eeschema-load-rendered.png
Normal file
|
After Width: | Height: | Size: 96 KiB |
BIN
tests/baseline-screenshots/eeschema-loaded-css.png
Normal file
|
After Width: | Height: | Size: 86 KiB |
BIN
tests/baseline-screenshots/eeschema-loaded.png
Normal file
|
After Width: | Height: | Size: 86 KiB |
BIN
tests/baseline-screenshots/eeschema-url-regex.png
Normal file
|
After Width: | Height: | Size: 95 KiB |
BIN
tests/baseline-screenshots/eeschema-wizard-00-initial.png
Normal file
|
After Width: | Height: | Size: 86 KiB |
|
Before Width: | Height: | Size: 164 KiB After Width: | Height: | Size: 151 KiB |
|
Before Width: | Height: | Size: 164 KiB After Width: | Height: | Size: 151 KiB |
|
After Width: | Height: | Size: 136 KiB |
BIN
tests/baseline-screenshots/pcbnew-draw-lines-01-after-click.png
Normal file
|
After Width: | Height: | Size: 139 KiB |
|
After Width: | Height: | Size: 146 KiB |
BIN
tests/baseline-screenshots/pcbnew-loaded-css.png
Normal file
|
After Width: | Height: | Size: 136 KiB |
BIN
tests/baseline-screenshots/pcbnew-loaded.png
Normal file
|
After Width: | Height: | Size: 136 KiB |
|
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 60 KiB |
BIN
tests/baseline-screenshots/pl_editor-02-no-wizard.png
Normal file
|
After Width: | Height: | Size: 60 KiB |
BIN
tests/baseline-screenshots/pl_editor-load-rendered.png
Normal file
|
After Width: | Height: | Size: 63 KiB |
|
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 60 KiB |
BIN
tests/baseline-screenshots/probe-00-after-wizard.png
Normal file
|
After Width: | Height: | Size: 136 KiB |
BIN
tests/baseline-screenshots/probe-01-file-menu-open.png
Normal file
|
After Width: | Height: | Size: 148 KiB |
BIN
tests/baseline-screenshots/probe-02-after-open-click.png
Normal file
|
After Width: | Height: | Size: 162 KiB |
BIN
tests/baseline-screenshots/probe-03-late.png
Normal file
|
After Width: | Height: | Size: 162 KiB |
|
Before Width: | Height: | Size: 94 KiB After Width: | Height: | Size: 67 KiB |
BIN
tests/baseline-screenshots/wizard-00-initial.png
Normal file
|
After Width: | Height: | Size: 61 KiB |
BIN
tests/baseline-screenshots/wizard-01.png
Normal file
|
After Width: | Height: | Size: 61 KiB |
BIN
tests/baseline-screenshots/wizard-02.png
Normal file
|
After Width: | Height: | Size: 61 KiB |
BIN
tests/baseline-screenshots/wizard-03.png
Normal file
|
After Width: | Height: | Size: 61 KiB |
BIN
tests/baseline-screenshots/wizard-04-finish.png
Normal file
|
After Width: | Height: | Size: 136 KiB |
BIN
tests/baseline-screenshots/zoom-pl_editor-00-baseline.png
Normal file
|
After Width: | Height: | Size: 60 KiB |
BIN
tests/baseline-screenshots/zoom-pl_editor-01-zoomed-in-at-P.png
Normal file
|
After Width: | Height: | Size: 51 KiB |
BIN
tests/baseline-screenshots/zoom-pl_editor-02-zoomed-out-back.png
Normal file
|
After Width: | Height: | Size: 62 KiB |
|
|
@ -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 };
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||