pentaho/hv-uikit-react/ui-unit-testing

Claude Code and agent skill by pentaho/hv-uikit-react

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Behavior-first testing guidelines for creating useful and resilient tests for React apps and components. Use when writing or reviewing Vitest + Testing Library tests.

Install

npx vskill@latest install pentaho/hv-uikit-react/ui-unit-testing

SKILL.md

UI Testing Guidelines

Core Principles

  • Use vitest and @testing-library/react for testing.
  • Use screen and semantic selectors (*ByRole, *ByLabelText) to query elements.
  • Use userEvent for simulating user interactions instead of fireEvent.
  • Focus tests on public/exported API & user behavior. DON'T test implementation details.
  • DON'T mock internal components from the same package.
  • DON'T test className or other styles. Visual tests are covered by Storybook + Chromatic.

Query Priority

Use this order for selectors:

  1. *ByRole with accessible name
  2. *ByLabelText or *ByText, *ByPlaceholderText for text-based labels
  3. *ByTextId AVOID if possible, only use when no other query is available

Example

tsx
import { render, screen } from "@testing-library/react";
import { userEvent } from "@testing-library/user-event";
import { expect, it, vi } from "vitest";
import { MyForm } from "./MyForm";
// short and descriptive 👇 test name focused on the behavior
it("submits the form when valid", async () => {
const submitMock = vi.fn();
render(<MyForm onSubmit={submitMock} />);
// prefer the `screen.*byRole` queries
const input = screen.getByRole("textbox", { name: /username/i });
await userEvent.type(input, "testUser");
const submitButton = screen.getByRole("button", { name: /submit/i });
await userEvent.click(submitButton);
// assert the user-observable UI changes
expect(screen.getByText(/form submitted successfully/i)).toBeInTheDocument();
expect(submitMock).toHaveBeenCalledWith({ username: "testUser" });
});

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
47
Repository forks
33
7-day trend score
19

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/pentaho/hv-uikit-react/ui-unit-testing/badge)](https://verified-skill.com/skills/pentaho/hv-uikit-react/ui-unit-testing)

Something wrong with this skill or its page? Tell us.