samhennessy/hlive/hlive-testing
Claude Code and agent skill by samhennessy/hlive
- community
Checking that the SKILL.md file is still in the repository.
Write browser tests for HLive pages using the hlivetest package (github.com/SamHennessy/hlive/hlivetest) and Playwright. Use when testing HLive UI behavior end-to-end — spinning up a test server, driving a real browser (Click/ClickAndWait, TextContent, GetAttribute), and asserting with hlivetest.Diff. Use when an HLive task mentions tests, Playwright, or verifying interactive behavior.
Install
npx vskill@latest install samhennessy/hlive/hlive-testingSKILL.md
HLive Testing
HLive's behavior lives in the browser round-trip, so it's tested by driving a real browser with Playwright via the hlivetest package. Tests boot an HLive server, open a browser page against it, interact, and assert on the resulting DOM.
Setup
Tests need Playwright browsers installed:
Because these are heavy browser tests, guard them so go test -short skips them (the harness below does this).
The harness pattern
HLive's own suite (hlivetest/pages/) uses a small per-package harness. Copy it into your test package:
NewServer takes a page factory (func() *l.Page) — the same kind of function you hand to l.NewPageServer. In a structured app (see the hlive-project skill) that's an exported factory from your page package, so a test imports it and passes it straight in: setup(t, page.Home).
Give the elements you select stable ids. With hhtml use the Id(...) attribute:
Writing a test
Use ClickAndWait before an assertion (it waits for HLive's diff to apply). Use plain Click for intermediate clicks where you'll assert only at the end:
hlivetest helpers
All take (t, pwpage, ...) unless noted:
Click(selector)— click without waiting for the diff.ClickAndWait(selector)— click, then block until the diff is applied.TextContent(selector) string— element text.GetAttribute(selector, attribute) string— an attribute value.GetID(selector) string— the element's HLive id.Title(pwpage) string— page title.Diff(want, got any)— assert equal, reporting a diff on failure (t.Error).DiffFatal(want, got any)— same butt.Fatal.FatalOnErr(err)— fail fast on an error.NewServer(pageFn) *Server/NewBrowserPage() playwright.Page— fixtures.
For interactions hlivetest doesn't wrap (typing, hover, selects), use the playwright.Page directly (h.pwpage.Fill(...), .Hover(...)), then assert with hlivetest.Diff.
Running
Reference
hlivetest/hlivetest.go, hlivetest/server.go, hlivetest/browser.go, and the examples hlivetest/pages/harness_test.go, hlivetest/pages/click_test.go, hlivetest/pages/click.go. Larger suites live under systemtests/.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugin/skills/hlive-testing/SKILL.md
Popularity
- 7-day trend score
- 0
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
[](https://verified-skill.com/skills/samhennessy/hlive/hlive-testing)