docs-e2e-tests

Writes and runs Playwright e2e tests for AG Grid documentation examples.

15.6k|2.1k|Updated Dec 23, 2014
One-click install
npx skills add https://github.com/ag-grid/ag-grid --skill docs-e2e-tests
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docs-e2e-tests
Source: https://github.com/ag-grid/ag-grid/tree/main/.rulesync/skills/docs-e2e-tests
Command: npx skills add https://github.com/ag-grid/ag-grid --skill docs-e2e-tests

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Documentation examples for AG Grid need meaningful Playwright test coverage, but writing cross-framework e2e tests by hand is slow and error-prone. This Skill automates discovering examples on a docs page, planning assertions from the doc prose and source code, writing example.spec.ts files, and running them against every framework.

Core Features & Use Cases

  • Example Discovery and Planning: Reads a docs page's index.mdoc and _examples/ directory, analyzes each example's main.ts and data files, and builds an approval-gated test plan covering every documented behaviour.
  • Deterministic Test Authoring: Generates example.spec.ts tests using agIdFor locators, web-first assertions, and deterministic waits (waitForRowAnimations, toPass) instead of flaky fixed timeouts, guided by a 12-pitfall reference for grouping, aggregation, tree data, sorting, and virtual scrolling.
  • Cross-Framework Verification: Runs specs via docs-e2e.sh against typescript, vanilla, reactFunctionalTs, angular, and vue3 in chromium, with --last-failed iteration for fast fix loops.
  • Use Case: Ask to add tests for the aggregation-total-rows docs page, and the Skill plans assertions per example, writes the spec files, runs them across all frameworks, and iterates until green.

Quick Start

Write Playwright tests for all examples on the aggregation-total-rows docs page and run them with docs-e2e.sh until they pass.

Frequently Asked Questions about docs-e2e-tests

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write Playwright tests for AG Grid documentation examples?

Read the docs page's index.mdoc and each example's main.ts to identify behaviours, then write example.spec.ts using test.eachFramework with agIdFor locators for rows, cells, and group expand icons. Run the spec with ./docs-e2e.sh "<example-folder-name>" from the repo root.

How do I run e2e tests across all AG Grid frameworks?

Run ./docs-e2e.sh "<example-folder-name>" from the repository root with no --framework flag. The default eachFramework run executes the spec against typescript, vanilla, reactFunctionalTs, angular, and vue3 in chromium in a single command.

Why are my AG Grid Playwright tests flaky?

Flakiness usually comes from fixed page.waitForTimeout calls or asserting row-index during sort animations. Use web-first assertions, waitForRowAnimations after re-renders, expect(...).toPass() for retried reads, and expectRowIdAtIndex for sort order checks.

How do I locate grand total and group rows in AG Grid tests?

Use agIdFor.cell('rowGroupFooter_ROOT_NODE_ID', colId).first() for grand total rows and 'row-group-{field}-{value}' IDs for group rows. Group footers use the prefix rowGroupFooter_ followed by the group row ID.

What are the prerequisites for running docs e2e tests?

The dev server must be running via yarn nx dev, verifiable in node_modules/.cache/ag-watch-status.json, and Playwright chromium must be installed with npx playwright install --with-deps chromium from documentation/ag-grid-docs/.