mirror of
https://github.com/diodeinc/pcb.git
synced 2026-09-14 20:17:19 +08:00
acff75845c
* Support net symbols * Run renderer tests in CI * renderer -> LayoutEngine * wip * rename * add examples * support symbol "extends" * start reworking layout engine + snapshot tests * add examples * wip add nets * Add signature to ModuleValue * tweaks * per-component net labels * movable * WIP with ELK * wip libavoid * misc fix * better * betterer * improvements * more * update * junction detection * better * snapping and stuff * fix re-rendering * more better * more * cargo fmt * update bg * eslint * cleanup, tests
52 lines
1.6 KiB
TypeScript
52 lines
1.6 KiB
TypeScript
import { defineConfig, devices } from "@playwright/experimental-ct-react";
|
|
import path from "path";
|
|
|
|
/**
|
|
* See https://playwright.dev/docs/test-configuration.
|
|
*/
|
|
export default defineConfig({
|
|
testDir: "./tests/visual",
|
|
/* Test files to run */
|
|
testMatch: "**/*.visual.pw.tsx",
|
|
/* The base directory, relative to the config file, for snapshot files created with toMatchSnapshot and toHaveScreenshot. */
|
|
snapshotDir: "./tests/visual/__snapshots__",
|
|
/* Maximum time one test can run for. */
|
|
timeout: 30 * 1000, // Increased timeout for building netlists
|
|
/* Run tests in files 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,
|
|
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
|
|
reporter: "html",
|
|
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
|
use: {
|
|
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
|
trace: "on-first-retry",
|
|
|
|
/* Port to use for Playwright component endpoint. */
|
|
ctPort: 3100,
|
|
|
|
/* Vite config for resolving paths */
|
|
ctViteConfig: {
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
tests: path.resolve(__dirname, "./tests"),
|
|
},
|
|
},
|
|
},
|
|
},
|
|
|
|
/* Configure projects for major browsers */
|
|
projects: [
|
|
{
|
|
name: "chromium",
|
|
use: { ...devices["Desktop Chrome"] },
|
|
},
|
|
],
|
|
});
|