Run and triage Playwright/xUnit UI tests for the PortfolioViewer application.
Install
mkdir -p .claude/skills/uitest-vibenl && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/18728" && unzip -o skill.zip -d .claude/skills/uitest-vibenl && rm skill.zipInstalls to .claude/skills/uitest-vibenl
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
GhostfolioSidekick UI test execution and triage skill for PortfolioViewer.WASM.UITests (Playwright + xUnit). Use when user asks to run UI tests, debug Playwright failures, add/adjust UI tests, or investigate page-level regressions in PortfolioViewer.Key capabilities
- →Run focused UI tests with a filter
- →Run full UI test suites
- →Triage test failures using screenshots and videos
- →Debug UI tests with browser console logs
- →Author new UI tests following specific rules
How it works
The skill provides commands to run Playwright-based UI tests, and a runbook for triaging failures using generated artifacts like screenshots, videos, and console logs.
Inputs & outputs
When to use uitest
- →Run UI regression tests
- →Debug failing Playwright tests
- →Add new UI tests
- →Triage page-level regressions
About this skill
Run and maintain UI tests for GhostfolioSidekick with repo-specific workflow.
Scope
Primary target:
PortfolioViewer/PortfolioViewer.WASM.UITests
Core files/patterns:
PlaywrightTestBase.csfor browser lifecycle, login + sync setup, screenshots/videos, console logging.DisposeAsyncautomatically captures failure artifacts (screenshot/HTML/console log) usingTestContext.Current.TestState.Result— no per-test try/catch needed.CustomWebApplicationFactory.csfor Kestrel host, in-memory SQLite, seeded data, WASM publish-to-wwwroot bootstrap. Thedotnet build/dotnet publishchild processes use boundedWaitForExit(TimeSpan)(5min/10min) withKill(entireProcessTree: true)on timeout — never revert to unboundedWaitForExit(), that previously caused whole-test-host hangs (see hangdump files historically found underTestResults/).WebApplicationFactoryCollection.csdisables parallelization for shared DB safety.PageObjects/BasePageObject.csfor sharedWaitForPageLoadAsync(spinner hidden → any stable state, waits are wrapped in.WaitAsync(ct)for cancellation responsiveness),ExecuteWithErrorCheckAsync(auto Blazor error check),CheckForBlazorErrorAsync.PageRenderAssertions.cs(test project root) — shared helper for the common "page rendered" tri-state assertion (AssertRendered(pageName, hasRows, isEmpty, hasError)) andAssertSeededSymbolsWhenRowsPresentAsync(...)for tightening checks againstTestDataSeederdata only when rows are actually present. Use these instead of copy-pastingAssert.True(hasRows || isEmpty || hasError, ...)blocks.PageObjects/*for page objects — all useNavigateDirectAsync(string? relativePath = null, CancellationToken ct = default).- Tests use
[RetryFact]fromxRetry.v3.
Trigger
Use this skill when user asks any of:
- "run UI tests", "run Playwright tests", "UITest", "UI regression"
- "debug failing PortfolioViewer page test"
- "add UI test for page X"
- "why does Playwright test fail/flaky"
Runbook
-
Ensure Playwright browsers installed (if first run or browser missing):
- Build test project so script exists:
dotnet build PortfolioViewer\PortfolioViewer.WASM.UITests\PortfolioViewer.WASM.UITests.csproj
- Install browsers:
pwsh PortfolioViewer\PortfolioViewer.WASM.UITests\bin\Debug\net10.0\playwright.ps1 install
- Build test project so script exists:
-
Run focused UI tests first:
dotnet test PortfolioViewer\PortfolioViewer.WASM.UITests\PortfolioViewer.WASM.UITests.csproj --filter "<pattern>"
-
Run full UI suite if needed:
dotnet test PortfolioViewer\PortfolioViewer.WASM.UITests\PortfolioViewer.WASM.UITests.csproj
-
Triage failures with artifacts:
- Screenshots:
playwright-screenshots/ - Videos:
playwright-videos/<TestName>/ - Browser console lines prefixed
[Browser Console] - Optional HTML capture from
CaptureErrorStateAsync()
- Screenshots:
-
Debug/verify with screenshots:
- Open newest
*-error-*.pngfirst for failed test. - Compare screenshot with expected page state after
SetupAsync()(logged-in, sync complete, page title/primary widget visible). - If selector assertion fails, verify target element exists in screenshot before changing waits/selectors.
- If screenshot shows blank/partial render, correlate with
[Browser Console]errors and#blazor-error-ui. - Keep screenshot path in failure summary so repro/debug starts from same visual state.
- Open newest
Authoring Rules
- Reuse
PlaywrightTestBaseand callSetupAsync()unless test intentionally targets pre-login behavior. - Prefer page objects under
PageObjects/; avoid raw selectors in test classes unless truly one-off. - Add stable waits (
WaitForSelectorAsync,WaitForURLAsync) over sleeps/timeouts. - Keep assertions behavior-focused (visible state, no error UI, expected records loaded).
- Preserve collection fixture model; do not enable parallel execution for this suite.
- Use
base.WaitForPageLoadAsync([selectors], timeout, ct)fromBasePageObject— it waits for spinner hidden then any stable state selector. - Use
ExecuteWithErrorCheckAsync()for navigation actions to auto-catch Blazor errors. - All page objects use
NavigateDirectAsync(string? relativePath = null, CancellationToken ct = default)— pass full URL for absolute paths. - In test env, pages may render
.alert-dangerwhen Ghostfolio API is not configured — assertions must accept error state as valid render. - Use
PageRenderAssertions.AssertRendered(...)for the rows/empty/error tri-state check instead of a new inlineAssert.True(hasRows || isEmpty || hasError, ...). UsePageRenderAssertions.AssertSeededSymbolsWhenRowsPresentAsync(...)to verify specificTestDataSeedersymbols only whenhasRowsis true. - Always use interpolated strings (
$"...{variable}") in assertion messages — a plain non-interpolated string containing{variable}silently prints the literal text and hides the actual failure value. Double-check this when writing/reviewing new assertions. - Any new child
Process.Start(...)usage (e.g. build/publish helpers) must use a boundedWaitForExit(TimeSpan)with a kill-on-timeout fallback — never an unboundedWaitForExit(), since a stuck child process hangs the entire test host with no diagnostics.
Hang Debugging
If a test run hangs or you find *.hangdump.dmp files under TestResults/:
- Check
CustomWebApplicationFactory.EnsureWasmPublishedToApiStaticFilesfirst — thedotnet build/dotnet publishchild processes are the most likely culprit for a full test-host hang since they run once per test process startup. - Confirm those calls still use bounded
WaitForExit(TimeSpan)+Kill(entireProcessTree: true)(do not let a regression reintroduce unboundedWaitForExit()). - Check for MSBuild server/NuGet lock contention (a second
dotnet buildrunning concurrently, e.g. from the IDE) as a common external cause. - Failure artifacts (screenshot/HTML/console log) are captured automatically on test failure via
PlaywrightTestBase.DisposeAsync— no extra wiring needed; just look inplaywright-screenshots/for*-failure-*and*-error-*files. TestResults/andplaywright-screenshots|videos/are gitignored — delete stale local copies freely, they are never meant to be committed.
Investigation Checklist
When UI test fails, check in order:
- API host bootstrapped (
CustomWebApplicationFactorystarted, dynamic URL assigned). - WASM static files published/copied to API
wwwroot. - Login path/token flow (
LoginPage, test token, auth health endpoint). - Sync completion gate (Sync button enabled again).
- Screenshot evidence from
playwright-screenshots/(actual visible UI state). - Page-specific selectors and expected seeded data (
TestDataSeeder). - Blazor error UI presence (
#blazor-error-ui). WaitForPageLoadAsynctimeout — check if page renders error state (.alert-danger) instead of expected selectors.
Boundaries
- This skill handles UI-test execution, debugging, and UI-test code changes only.
- Do not change unrelated backend/domain logic unless UI failure root-cause requires minimal coupled fix.
When not to use it
- →When changing unrelated backend/domain logic
- →When enabling parallel execution for the test suite
- →When using raw selectors extensively in test classes
Limitations
- →Handles UI-test execution, debugging, and UI-test code changes only
- →Does not change unrelated backend/domain logic
- →Does not support parallel execution for the test suite
How it compares
This skill offers a specialized workflow for running and debugging UI tests for GhostfolioSidekick's PortfolioViewer, including specific triage steps and authoring rules, unlike generic UI testing.
Compared to similar skills
uitest side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| uitest (this skill) | 0 | 19d | No flags | Intermediate |
| webapp-testing | 353 | 3mo | Review | Intermediate |
| ui-ux-expert-skill | 91 | 9mo | Review | Advanced |
| accessibility | 42 | 5mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
webapp-testing
anthropics
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
ui-ux-expert-skill
fercracix33
Technical workflow for implementing accessible React user interfaces with shadcn/ui, Tailwind CSS, and TanStack Query. Includes 6-phase process with mandatory Style Guide compliance, Context7 best practices consultation, Chrome DevTools validation, and WCAG 2.1 AA accessibility standards. Use after Test Agent, Implementer, and Supabase agents complete their work.
accessibility
tech-leads-club
Audit and improve web accessibility following WCAG 2.1 guidelines. Use when asked to "improve accessibility", "a11y audit", "WCAG compliance", "screen reader support", "keyboard navigation", or "make accessible".
playwright-browser-automation
lackeyjb
Complete browser automation with Playwright. Auto-detects dev servers, writes clean test scripts to /tmp. Test pages, fill forms, take screenshots, check responsive design, validate UX, test login flows, check links, automate any browser task. Use when user wants to test websites, automate browser interactions, validate web functionality, or perform any browser-based testing.
svelte-expert
Raudbjorn
Expert Svelte/SvelteKit development assistant for building components, utilities, and applications. Use when creating Svelte components, SvelteKit applications, implementing reactive patterns, handling state management, working with stores, transitions, animations, or any Svelte/SvelteKit development task. Includes comprehensive documentation access, code validation with svelte-autofixer, and playground link generation.
browser-daemon
noiv
Persistent browser automation via Playwright daemon. Keep a browser window open and send it commands (navigate, execute JS, inspect console). Perfect for interactive debugging, development, and testing web applications. Use when you need to interact with a browser repeatedly without opening/closing it.