waygraph 0.15.16 → 0.15.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -1
- package/dist/cli.js +25 -6
- package/examples/routed-demo/playwright.config.ts +2 -1
- package/examples/saucedemo/playwright.config.ts +2 -1
- package/package.json +1 -1
- package/templates/quickstart/playwright.config.ts +2 -1
- package/templates/scaffold/playwright.config.ts +2 -1
- package/examples/routed-demo/test-results/.last-run.json +0 -4
package/README.md
CHANGED
|
@@ -1045,7 +1045,12 @@ suite - it forwards to the local `node_modules/.bin/playwright` (falling back to
|
|
|
1045
1045
|
exactly like `playwright test`, and anything after it (`--grep`, a spec path, `--headed`, …)
|
|
1046
1046
|
passes straight through. `waygraph test ui` (or `waygraph test --ui`) launches Playwright's
|
|
1047
1047
|
interactive UI Mode the same way. Scaffolded projects (`waygraph init`/`create-waygraph`)
|
|
1048
|
-
wire this up as `npm test` / `npm run test:ui
|
|
1048
|
+
wire this up as `npm test` / `npm run test:ui`, and ship `trace: "retain-on-failure"` plus
|
|
1049
|
+
the `html` reporter in `playwright.config.ts`, so a failing `waygraph test` already has a
|
|
1050
|
+
trace waiting - `waygraph test report` opens the HTML report, and
|
|
1051
|
+
`waygraph test show-trace <trace.zip>` opens one trace directly (both forward to Playwright's
|
|
1052
|
+
own `show-report`/`show-trace`, which live outside `playwright test`, so they're handled
|
|
1053
|
+
before the `test` forward rather than passed through it).
|
|
1049
1054
|
|
|
1050
1055
|
Flows are files (0.10.5+):
|
|
1051
1056
|
|
|
@@ -1088,6 +1093,8 @@ Flows are files (0.10.5+):
|
|
|
1088
1093
|
| One-shot temp-dir demo | `waygraph try demo` / `waygraph try auto` / `waygraph try auto:cli` |
|
|
1089
1094
|
| Run the project's `@playwright/test` suite | `waygraph test` |
|
|
1090
1095
|
| Same suite, Playwright's interactive UI Mode | `waygraph test ui` (or `--ui`) |
|
|
1096
|
+
| Open the last HTML report | `waygraph test report` |
|
|
1097
|
+
| Open one trace in the trace viewer | `waygraph test show-trace <trace.zip>` |
|
|
1091
1098
|
|
|
1092
1099
|
`--blocks` / positional accepts a Flow export, a `.flow.ts` path, or `"a then b"`.
|
|
1093
1100
|
`auto <file.flow.ts>` **runs** that flow (same as `run`); bare `auto` still explores.
|
package/dist/cli.js
CHANGED
|
@@ -7341,7 +7341,12 @@ Primary (less is more):
|
|
|
7341
7341
|
thin wrapper: forwards to the local playwright
|
|
7342
7342
|
binary (or npx playwright as a fallback)
|
|
7343
7343
|
test ui / test --ui Playwright UI Mode (interactive, watch + trace)
|
|
7344
|
+
test report [dir] Open the last HTML report (playwright show-report)
|
|
7345
|
+
test show-trace <file> Open one trace.zip in the trace viewer
|
|
7344
7346
|
<any other args> Forwarded verbatim (--grep, a spec path, --headed, …)
|
|
7347
|
+
Scaffolds ship trace: "retain-on-failure" + the
|
|
7348
|
+
html reporter, so a failed waygraph test already
|
|
7349
|
+
has a trace - test report opens it.
|
|
7345
7350
|
|
|
7346
7351
|
Also:
|
|
7347
7352
|
waygraph list | nav | validate | check | typecheck | graph | init <name>
|
|
@@ -7475,17 +7480,31 @@ async function main() {
|
|
|
7475
7480
|
}
|
|
7476
7481
|
case "test": {
|
|
7477
7482
|
const rest = args.slice(1);
|
|
7483
|
+
const proj = process.cwd();
|
|
7484
|
+
const localPlaywrightBin = join(proj, "node_modules", ".bin", "playwright");
|
|
7485
|
+
const runPw = (pwArgs) => existsSync(localPlaywrightBin)
|
|
7486
|
+
? runInherited(localPlaywrightBin, pwArgs, proj)
|
|
7487
|
+
: runInherited("npx", ["--yes", "playwright", ...pwArgs], proj);
|
|
7488
|
+
// report/show-trace are separate top-level `playwright` commands, not
|
|
7489
|
+
// `playwright test` subcommands - handled before the `test` forward below.
|
|
7490
|
+
if (rest[0] === "report") {
|
|
7491
|
+
process.exitCode = await runPw(["show-report", ...rest.slice(1)]);
|
|
7492
|
+
break;
|
|
7493
|
+
}
|
|
7494
|
+
if (rest[0] === "show-trace") {
|
|
7495
|
+
if (!rest[1]) {
|
|
7496
|
+
console.error("waygraph test show-trace: missing <trace.zip> (or a test-results/ dir)");
|
|
7497
|
+
process.exit(1);
|
|
7498
|
+
}
|
|
7499
|
+
process.exitCode = await runPw(["show-trace", ...rest.slice(1)]);
|
|
7500
|
+
break;
|
|
7501
|
+
}
|
|
7478
7502
|
const wantsUi = rest[0] === "ui" || rest.includes("--ui");
|
|
7479
7503
|
const forwarded = rest[0] === "ui" ? rest.slice(1) : rest;
|
|
7480
7504
|
const pwArgs = wantsUi && !forwarded.includes("--ui")
|
|
7481
7505
|
? ["test", "--ui", ...forwarded]
|
|
7482
7506
|
: ["test", ...forwarded];
|
|
7483
|
-
|
|
7484
|
-
const localPlaywrightBin = join(proj, "node_modules", ".bin", "playwright");
|
|
7485
|
-
const code = existsSync(localPlaywrightBin)
|
|
7486
|
-
? await runInherited(localPlaywrightBin, pwArgs, proj)
|
|
7487
|
-
: await runInherited("npx", ["--yes", "playwright", ...pwArgs], proj);
|
|
7488
|
-
process.exitCode = code;
|
|
7507
|
+
process.exitCode = await runPw(pwArgs);
|
|
7489
7508
|
break;
|
|
7490
7509
|
}
|
|
7491
7510
|
case "init": {
|
|
@@ -8,10 +8,11 @@ export default defineConfig({
|
|
|
8
8
|
fullyParallel: false,
|
|
9
9
|
workers: 1,
|
|
10
10
|
timeout: 30_000,
|
|
11
|
-
reporter: "list",
|
|
11
|
+
reporter: [["list"], ["html", { open: "never" }]],
|
|
12
12
|
use: {
|
|
13
13
|
headless: true,
|
|
14
14
|
baseURL: process.env.WAYGRAPH_BASE_URL || `http://${HOST}:${PORT}`,
|
|
15
|
+
trace: "retain-on-failure",
|
|
15
16
|
launchOptions: {
|
|
16
17
|
executablePath: process.env.CHROME_PATH || process.env.CHROMIUM_PATH,
|
|
17
18
|
args: ["--no-sandbox", "--disable-dev-shm-usage"],
|
|
@@ -5,10 +5,11 @@ export default defineConfig({
|
|
|
5
5
|
fullyParallel: false,
|
|
6
6
|
workers: 1,
|
|
7
7
|
timeout: 30_000,
|
|
8
|
-
reporter: "list",
|
|
8
|
+
reporter: [["list"], ["html", { open: "never" }]],
|
|
9
9
|
use: {
|
|
10
10
|
headless: true,
|
|
11
11
|
baseURL: "https://www.saucedemo.com",
|
|
12
|
+
trace: "retain-on-failure",
|
|
12
13
|
launchOptions: {
|
|
13
14
|
// Canonical Chromium on this machine is the Flatpak install - never let
|
|
14
15
|
// Playwright download its own bundled binary. See .agent/manager-agent.md.
|
package/package.json
CHANGED
|
@@ -5,10 +5,11 @@ export default defineConfig({
|
|
|
5
5
|
fullyParallel: false,
|
|
6
6
|
workers: 1,
|
|
7
7
|
timeout: 30_000,
|
|
8
|
-
reporter: "list",
|
|
8
|
+
reporter: [["list"], ["html", { open: "never" }]],
|
|
9
9
|
use: {
|
|
10
10
|
headless: true,
|
|
11
11
|
baseURL: "https://www.saucedemo.com",
|
|
12
|
+
trace: "retain-on-failure",
|
|
12
13
|
launchOptions: {
|
|
13
14
|
// Canonical Chromium on this machine is the Flatpak install - never let
|
|
14
15
|
// Playwright download its own bundled binary. See .agent/manager-agent.md.
|
|
@@ -7,9 +7,10 @@ const FIXTURE_ORIGIN = `http://${FIXTURE_HOST}:${FIXTURE_PORT}`;
|
|
|
7
7
|
export default defineConfig({
|
|
8
8
|
testDir: "./tests",
|
|
9
9
|
fullyParallel: true,
|
|
10
|
-
reporter: "list",
|
|
10
|
+
reporter: [["list"], ["html", { open: "never" }]],
|
|
11
11
|
use: {
|
|
12
12
|
baseURL: FIXTURE_ORIGIN,
|
|
13
|
+
trace: "retain-on-failure",
|
|
13
14
|
launchOptions: {
|
|
14
15
|
executablePath: process.env.CHROME_PATH || process.env.CHROMIUM_PATH,
|
|
15
16
|
},
|