Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

panel-testing-strategy

Skill by grafana

Guides writing unit and E2E tests for Grafana visualization panels and viz utilities. It is for developers working in the Grafana repo who need tests that check real behavior instead of just rendering or existence.

  • Score 87
  • 78k stars
  • AGPL-3.0
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install panel-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/panel-testing-strategy ~/.claude/skills/panel-testing-strategy

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install panel-testing-strategy in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This skill sets out how to write unit and E2E tests for Grafana visualization panels, grafana-ui viz components, and grafana-data viz utilities. It builds on the frontend-testing-strategy skill and adds rules specific to visualization code. It covers building data frames with one builder per file, rendering panels with a shared panel-props helper, and testing canvas panels with a draw-call snapshot harness instead of pixel diffs. It also covers accessibility scans and interaction aria snapshots for each panel in Playwright, plus anti-flake rules for canvas and uPlot. It is for developers and reviewers adding, backfilling, or reviewing panel tests in the Grafana codebase.

Written from the project's SKILL.md and checked against it.

What it can do

  • Data frame setupBuilds test data frames with @grafana/data builders and a Partial overrides object.
  • Panel renderingRenders panels with the shared getPanelProps helper and applyFieldOverrides.
  • Canvas snapshot harnessCaptures canvas draw-call streams and asserts them with toMatchCanvasSnapshot.
  • Accessibility E2E checksRequires an @a11y Playwright scan for every panel using toHaveNoA11yViolations.
  • Interaction aria snapshotsSnapshots the accessibility tree across hover, legend toggle, sort, edit, and empty states.
  • Canvas anti-flake rulesLists four uPlot and canvas rules, such as pinning data and waiting for renderer status 1.
  • Review of AI-generated testsFlags panel tests that only assert it rendered or is defined, and checks for false confidence.

What you need

  • Grafana repository checkout
  • pnpm
  • Playwright for E2E tests

Try asking

  • Write unit tests for the timeseries panel using getPanelProps and a fixed data frame.
  • Review this barchart test and flag any assertions that only check it rendered.
  • Add an @a11y Playwright test for the table panel with a scan for violations.

Good to know

  • E2E testing is reserved for cross-component interaction and per-panel smoke coverage, so unit tests come first.
  • Pixel-level visual regression is left to Meticulous, not this skill.
  • Canvas tests compare draw-call streams, not pixels.
  • File paths and helpers are specific to the Grafana repository.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: .claude/skills/panel-testing-strategy/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md10 KB

Alternatives to panel-testing-strategy

All alternatives →
openclaw-github-repo-commandersickn33
94

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.

AAA Skill 50k
gradiogradio-app
94

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.

AAA Skill 44k
hig-components-menussickn33
94

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.

AAA Skill 50k
fastapi-templateswshobson
94

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.

AAA Skill 43k
appfunctionsandroid
94

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.

AAA Skill 11k
agent-qa-authoringsickn33
94

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.

AAA Skill 50k

Compare with openclaw-github-repo-commander, gradio or hig-components-menus

panel-testing-strategy: common questions

Does this skill test panels by comparing screenshots?

No. Canvas panels are tested by capturing the ctx draw-call stream, and pixel-level visual regression is left to Meticulous.

Does every Grafana panel need an accessibility test?

Yes. The skill says every panel must have an E2E accessibility test using the scanForA11yViolations fixture and the @a11y tag.

What makes canvas panel tests flaky according to this skill?

Non-deterministic data or relative time ranges, coordinate-based hover on canvas, broad locators like .uplot, and asserting before the renderer is ready.

How do I install panel-testing-strategy?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is panel-testing-strategy free?

The code is published under the AGPL-3.0 licence. The service it connects to may have its own pricing.

Is panel-testing-strategy safe to use?

It scores 87 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 panel-testing-strategy?

Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.

panel-testing-strategy Install

Add to stack

Loading.