원클릭으로
e2e-example-acceptance
// Validate or update example-level E2E coverage. Use when adding/updating e2e.spec.ts, debugging example start/build/preview behavior, or verifying browser console/request errors and page expectations.
// Validate or update example-level E2E coverage. Use when adding/updating e2e.spec.ts, debugging example start/build/preview behavior, or verifying browser console/request errors and page expectations.
Use when building Farm locally from source, native bindings or Rust plugin artifacts are missing, or an example/E2E needs local core and plugin artifacts.
Comprehensive Farm build-tool reference for AI agents. Use when writing or reviewing farm.config.ts, adding/configuring plugins, troubleshooting builds, implementing SSR or library mode, using the JavaScript API, writing Farm JS/Rust plugins, or authoring custom plugins from scratch. Covers all config options, official plugins, CLI commands, key features, and plugin authoring sourced from website/docs.
Deep integration with Docusaurus for documentation site development. Configure projects, manage sidebars, versioning, i18n, develop plugins, and optimize builds for React-based documentation.
Run Farm verification with build-first constraints. For verify/acceptance, use npm run build only for core, rust plugins, and affected examples; do not run cargo check/clippy. Use when validating changes before merge or push.
Commit and push repository changes safely. Use when user asks to commit, push, or verify and push current changes.
Fetch origin/main, rebase current branch, resolve conflicts safely, then commit and push changes; create a PR if none exists for the branch.
| name | e2e-example-acceptance |
| description | Validate or update example-level E2E coverage. Use when adding/updating e2e.spec.ts, debugging example start/build/preview behavior, or verifying browser console/request errors and page expectations. |
| license | MIT |
| compatibility | Requires Node, pnpm, and Playwright dependencies installed. |
| metadata | {"author":"farm","version":"1.0"} |
Run example acceptance with executable checks for start/build/preview and browser behavior.
examples/<name>/e2e.spec.tsIdentify affected examples
examples/<name>/... paths.Build each affected example
cd examples/<name> && npm run buildRun start and preview checks for each affected example
e2e.spec.ts, run targeted E2E:pnpm run test-e2e -- --example <name>cd examples/<name> && npm run startcd examples/<name> && npm run previewBrowser-level acceptance criteria
error/pageerror messages.requestfailed entries.Update or add E2E tests when needed
examples/<name>/e2e.spec.ts for feature-specific behavior.start and preview coverage unless the example is explicitly single-mode.import { basename, dirname } from "path";
import { fileURLToPath } from "url";
import { expect, startAndTest } from "../../e2e/index.js";
const name = basename(import.meta.url);
const projectPath = dirname(fileURLToPath(import.meta.url));
export default async function (ctx) {
const runTest = (command?: "start" | "preview") =>
startAndTest(
projectPath,
async (page) => {
await page.waitForSelector("#root > *", { timeout: 10000 });
// assert page content and absence of runtime anomalies
},
command,
);
await ctx.test("e2e start", () => runTest());
await ctx.test("e2e preview", () => runTest("preview"));
}
Examples: list of verified examplesBuild: pass/fail per exampleE2E Start: pass/fail per exampleE2E Preview: pass/fail per exampleAnomalies: console/request/pageerror summaryNotes: expected skips or known caveatspnpm run ready unless the user explicitly asks for full CI parity.dist/ files.scripts/test-e2e.mts) — vitest is no longer involved.