@riddledc/riddle-proof-runner-playwright
v0.4.3
Published
Local Playwright runner for Riddle Proof profiles.
Downloads
713
Readme
@riddledc/riddle-proof-runner-playwright
Local, self-hosted Playwright runtime for Riddle Proof profiles.
This package is the minimal trusted reference implementation for running profile scripts in your own process.
Install
pnpm add -D @riddledc/riddle-proof-runner-playwright
pnpm add -D playwrightplaywright is a peer dependency and must be installed in your environment.
CLI
Run one profile with a local browser session:
riddle-proof-playwright run-profile \
--profile ./mobile-layout-smoke.json \
--url https://example.com \
--output ./artifacts/riddle-proof \
--viewport-name desktopUse --help for full flag details.
Node API
import { runProfileLocal } from "@riddledc/riddle-proof-runner-playwright";
const result = await runProfileLocal({
profile: {
version: "riddle-proof.profile.v1",
name: "mobile-layout-smoke",
target: {
route: "/",
viewports: [{ name: "desktop", width: 1280, height: 800 }],
wait_for_selector: "body",
setup_actions: [{ type: "wait", ms: 200 }],
},
checks: [
{ type: "text_visible", text: "Example" },
{ type: "no_fatal_console_errors" },
],
},
outputDir: "./artifacts/riddle-proof",
url: "https://example.com",
});
console.log(result.result.status);Artifacts are written to the output directory:
profile-result.jsonproof.jsonconsole.jsondom-summary.jsonsummary.mdartifact-manifest.json- optional
screenshots/*.png
Outputs
result: normalizedRiddleProofProfileResultoutputDir: resolved output directory used for artifact writesmanifestPath: absolute path toartifact-manifest.json
