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.zip

Installs 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.
250 chars✓ has a “when” trigger
Intermediate

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

You give it
User request to run, debug, or add UI tests for PortfolioViewer
You get back
Test results, triage information, or new UI test code

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.cs for browser lifecycle, login + sync setup, screenshots/videos, console logging. DisposeAsync automatically captures failure artifacts (screenshot/HTML/console log) using TestContext.Current.TestState.Result — no per-test try/catch needed.
  • CustomWebApplicationFactory.cs for Kestrel host, in-memory SQLite, seeded data, WASM publish-to-wwwroot bootstrap. The dotnet build/dotnet publish child processes use bounded WaitForExit(TimeSpan) (5min/10min) with Kill(entireProcessTree: true) on timeout — never revert to unbounded WaitForExit(), that previously caused whole-test-host hangs (see hangdump files historically found under TestResults/).
  • WebApplicationFactoryCollection.cs disables parallelization for shared DB safety.
  • PageObjects/BasePageObject.cs for shared WaitForPageLoadAsync (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)) and AssertSeededSymbolsWhenRowsPresentAsync(...) for tightening checks against TestDataSeeder data only when rows are actually present. Use these instead of copy-pasting Assert.True(hasRows || isEmpty || hasError, ...) blocks.
  • PageObjects/* for page objects — all use NavigateDirectAsync(string? relativePath = null, CancellationToken ct = default).
  • Tests use [RetryFact] from xRetry.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

  1. 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
  2. Run focused UI tests first:

    • dotnet test PortfolioViewer\PortfolioViewer.WASM.UITests\PortfolioViewer.WASM.UITests.csproj --filter "<pattern>"
  3. Run full UI suite if needed:

    • dotnet test PortfolioViewer\PortfolioViewer.WASM.UITests\PortfolioViewer.WASM.UITests.csproj
  4. Triage failures with artifacts:

    • Screenshots: playwright-screenshots/
    • Videos: playwright-videos/<TestName>/
    • Browser console lines prefixed [Browser Console]
    • Optional HTML capture from CaptureErrorStateAsync()
  5. Debug/verify with screenshots:

    • Open newest *-error-*.png first 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.

Authoring Rules

  • Reuse PlaywrightTestBase and call SetupAsync() 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) from BasePageObject — 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-danger when 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 inline Assert.True(hasRows || isEmpty || hasError, ...). Use PageRenderAssertions.AssertSeededSymbolsWhenRowsPresentAsync(...) to verify specific TestDataSeeder symbols only when hasRows is 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 bounded WaitForExit(TimeSpan) with a kill-on-timeout fallback — never an unbounded WaitForExit(), 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/:

  1. Check CustomWebApplicationFactory.EnsureWasmPublishedToApiStaticFiles first — the dotnet build/dotnet publish child processes are the most likely culprit for a full test-host hang since they run once per test process startup.
  2. Confirm those calls still use bounded WaitForExit(TimeSpan) + Kill(entireProcessTree: true) (do not let a regression reintroduce unbounded WaitForExit()).
  3. Check for MSBuild server/NuGet lock contention (a second dotnet build running concurrently, e.g. from the IDE) as a common external cause.
  4. Failure artifacts (screenshot/HTML/console log) are captured automatically on test failure via PlaywrightTestBase.DisposeAsync — no extra wiring needed; just look in playwright-screenshots/ for *-failure-* and *-error-* files.
  5. TestResults/ and playwright-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:

  1. API host bootstrapped (CustomWebApplicationFactory started, dynamic URL assigned).
  2. WASM static files published/copied to API wwwroot.
  3. Login path/token flow (LoginPage, test token, auth health endpoint).
  4. Sync completion gate (Sync button enabled again).
  5. Screenshot evidence from playwright-screenshots/ (actual visible UI state).
  6. Page-specific selectors and expected seeded data (TestDataSeeder).
  7. Blazor error UI presence (#blazor-error-ui).
  8. WaitForPageLoadAsync timeout — 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.

SkillInstallsUpdatedSafetyDifficulty
uitest (this skill)019dNo flagsIntermediate
webapp-testing3533moReviewIntermediate
ui-ux-expert-skill919moReviewAdvanced
accessibility425moReviewIntermediate

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.

353585

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.

91244

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".

42174

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.

29146

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.

11107

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.

587

Search skills

Search the agent skills registry