.agents/skills/e2e-cucumber-playwright/SKILL.md
Write, update, or review Dify end-to-end tests under `e2e/` that use Cucumber, Gherkin, and Playwright. Use when the task involves `.feature` files, `features/step-definitions/`, `features/support/`, `DifyWorld`, scenario tags, locator/assertion choices, or E2E testing best practices for this repository.
npx skillsauth add langgenius/dify e2e-cucumber-playwrightInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill for Dify's repository-level E2E suite in e2e/. Use e2e/AGENTS.md as the canonical guide for local architecture and conventions, then apply Playwright/Cucumber best practices only where they fit the current suite.
.feature files, Cucumber step definitions, DifyWorld, hooks, tags, and E2E review work under e2e/.web/; use frontend-testing instead.api/.e2e/AGENTS.md first..feature files under e2e/features/e2e/features/step-definitions/e2e/features/support/hooks.ts and e2e/features/support/world.ts when session lifecycle or shared state matterse2e/scripts/run-cucumber.ts and e2e/cucumber.config.ts when tags or execution flow matterreferences/playwright-best-practices.md only when locator, assertion, isolation, or waiting choices are involved.references/cucumber-best-practices.md only when scenario wording, step granularity, tags, or expression design are involved.e2e/ uses Cucumber for scenarios and Playwright as the browser layer.DifyWorld is the per-scenario context object. Type this as DifyWorld and use async function, not arrow functions.e2e/features/step-definitions/; use common/ only for broadly reusable steps.features/support/hooks.ts:
@unauthenticated: clean browser context@authenticated: readability/selective-run tag only unless implementation changes@fresh: only for e2e:full* flowsDifyWorld architecture unless the task is explicitly about changing that architecture.{string} and {int}.getByRole, getByLabel, getByPlaceholder, getByText, then getByTestId for explicit contracts.expect(...) assertions.waitForTimeout, manual polling, or raw visibility checks when a locator action or retrying assertion already expresses the behavior.pnpm -C e2e check.DifyWorld usage?Lead findings with correctness, flake risk, and architecture drift.
references/playwright-best-practices.mdreferences/cucumber-best-practices.mddevelopment
Generate Vitest + React Testing Library tests for Dify frontend components, hooks, and utilities. Triggers on testing, spec files, coverage, Vitest, RTL, unit tests, integration tests, or write/review test requests.
tools
Guide for implementing Dify frontend query and mutation patterns with TanStack Query and oRPC. Trigger when creating or updating contracts in web/contract, wiring router composition, consuming consoleQuery or marketplaceQuery in components or services, deciding whether to call queryOptions() directly or extract a helper or use-* hook, handling conditional queries, cache invalidation, mutation error handling, or migrating legacy service calls to contract-first query and mutation helpers.
development
Trigger when the user requests a review of frontend files (e.g., `.tsx`, `.ts`, `.js`). Support both pending-change reviews and focused file reviews while applying the checklist rules.
development
Refactor high-complexity React components in Dify frontend. Use when `pnpm analyze-component --json` shows complexity > 50 or lineCount > 300, when the user asks for code splitting, hook extraction, or complexity reduction, or when `pnpm analyze-component` warns to refactor before testing; avoid for simple/well-structured components, third-party wrappers, or when the user explicitly wants testing without refactoring.