frontend-testing-strategy
Skill by grafana
Writes and runs unit and E2E tests for Grafana frontend code in React and TypeScript. It is for developers who add, review or fix frontend tests in the Grafana repository.
Install frontend-testing-strategy
Built from the published package, never by AI.
git clone --depth 1 https://github.com/grafana/grafana /tmp/grafana && mkdir -p ~/.claude/skills && cp -r /tmp/grafana/.claude/skills/frontend-testing-strategy ~/.claude/skills/frontend-testing-strategyRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install frontend-testing-strategy in Claude Code
git clone --depth 1 https://github.com/grafana/grafana /tmp/grafana && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/grafana/.claude/skills/frontend-testing-strategy ~/.gemini/antigravity-cli/skills/frontend-testing-strategyAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install frontend-testing-strategy in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
frontend-testing-strategy is an agent skill, defined in a SKILL.md file, for writing and running unit and end-to-end tests for Grafana frontend code. It applies to any package or feature area and sets out the conventions the repo expects. It covers running Playwright E2E tests with pnpm e2e:playwright, resolving which file or area a request targets, and extending co-located test files.
The skill sets rules for test quality. Tests should assert concrete behavior rather than existence, use literal expected values, and be checked by mutating the code to confirm they fail. It warns against slop tests, limits mocking to network calls, time and unavailable environments, and asks for positive assertions and behavior-specific test names. It is for developers and reviewers working on Grafana frontend tests, and it points visualization panel work to a second skill.
Written from the project's SKILL.md and checked against it.
What it can do
- Run Playwright E2E testsRuns E2E specs with pnpm e2e:playwright, using the harness-managed Grafana server on port 3001 by default.
- Resolve the test targetInterprets a file path, directory, open file or no argument to decide the scope of tests.
- Assert real behaviorReplaces existence-only checks such as toBeDefined with assertions on concrete computed values.
- Freeze expected valuesUses literal expected values, with an exception for theme colors taken from the supplied theme.
- Check assertions have teethMutates the asserted value or its source to confirm the test goes red.
- Minimize mockingMocks network calls, time and unavailable environments, but not localStorage or a module's own helpers.
- Name tests preciselyRequires behavior-specific it() descriptions and it.each with $name labels for enumerable variants.
- Review AI-generated testsFlags unfocused, verbose and limiting slop tests before they are opened as a PR.
What you need
- pnpm
- A Grafana frontend repository (React and TypeScript)
- Playwright for E2E tests
Try asking
- Run the Playwright E2E spec for the dashboard settings page
- Review this AI-generated test for slop and tighten its assertions
- Backfill unit tests for the open file with real behavior checks
Good to know
- Setting GRAFANA_URL disables the harness-managed server, so the target instance must already be running.
- Visualization panels and grafana-ui viz components also need the panel-testing-strategy skill.
- With no path and no open file, the skill asks which area to test instead of generating broadly.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .claude/skills/frontend-testing-strategy/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to frontend-testing-strategy
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
frontend-testing-strategy: common questions
Should I start a Grafana server before running E2E tests?
No. The harness starts its own lightweight Grafana server on port 3001, and the skill says not to run make run just to run E2E tests.
Should new frontend tests go in new files?
Usually not. The skill prefers extending an existing co-located *.test.ts(x) file and matching its imports and idiom.
Can I update a test that fails after a code change?
Only after analysis. The skill says a failing test is doing its job, and existing tests should change only after tracing the real code.
How do I install frontend-testing-strategy?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is frontend-testing-strategy free?
The code is published under the AGPL-3.0 licence. The service it connects to may have its own pricing.
Is frontend-testing-strategy safe to use?
It scores 86 of 100. Grades: maintenance A, licence C, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to frontend-testing-strategy?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
