This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
The Verify getting-started wizard: a Blazor WebAssembly app deployed to https://verifytests.github.io/Wizard/
by .github/workflows/deploy.yml.
dotnet build src/Wizard.Tests --configuration Release
dotnet run --project src/Wizard.Tests --configuration Release --no-buildFilter to a single test (TUnit uses --treenode-filter, not --filter):
dotnet run --project src/Wizard.Tests --configuration Release --no-build -- --treenode-filter '/*/*/HomeTests/*'Integration/GeneratedSolutionTests is [Explicit]. It writes a generated solution for each test framework to the temp directory, then runs dotnet build and dotnet test on it (restoring from nuget.org). Run it after changing anything in Wizard.Core/Generation:
dotnet run --project src/Wizard.Tests --configuration Release --no-build -- --treenode-filter '/*/*/GeneratedSolutionTests/*'Content/ContentDriftTests is also [Explicit] and run weekly by content-drift.yml. It checks that
Wizard.Core/Content/*.include.md still equal Verify's originals, and snapshots the upstream files the
wizard adapts rather than copies (ai-usage, the core samples) under Content/Upstream. When one fails,
bring the wizard's copy in line with the upstream diff, then accept the snapshot.
Building Wizard.Tests also publishes Wizard.Web into src/Wizard.Tests/bin/<Configuration>/blazor-publish
(the PublishBlazorForTests target). PublishedWizard serves that output from Kestrel for the Playwright
tests, with a {*path} fallback that mirrors GitHub Pages serving 404.html for deep links.
The Playwright tests share one browser context, so each page from PublishedWizard.NewPage() gets an
in-memory localStorage of its own: the wizard restores remembered answers on load, and a shared
storage would let parallel tests leak into each other. A test about remembering between visits uses
NewIsolatedPage(), which has real storage in a context of its own, and closes that context when done.
src/Wizard.Core: models, registry, generators. A plain class library with no Blazor dependency, so generator tests stay fast.GenerateWizardDefaultsin its csproj bakes the SDK version (fromglobal.json) and the target framework (GeneratedTargetFrameworkinsrc/Directory.Build.props) intoWizardDefaults. Generated solutions use those values.Registry/Plugins.<A-D>.cshold onePluginDefinitionper plugin, split across four files.Registry/InteractionRules.Data.csholds the combinations. ReadPluginDefinition.csbefore adding an entry: its xml docs are the contract, andRegistryTestsenforces most of it.- Every package id an entry names needs a version in
Versions/package-versions.json, and it must be one that exists on nuget.org; a repo's own<Version>is often the next unreleased one.src/Wizard.VersionRefreshrewrites that file with the newest stable versions (refresh-versions.ymlruns it weekly); run it locally rather than editing versions by hand:dotnet run --project src/Wizard.VersionRefresh -- src/Wizard.Core/Versions/package-versions.json summary.md. - Generator snapshots use
GeneratorTests.Versions, with every package at 1.0.0, so a refresh never changes them; the browser tests answer for nuget.org throughFakeNuGet.
src/Wizard.Web: the Blazor UI.src/Wizard.Tests: TUnit tests. There are bunit component tests, Playwright screen snapshots (PNG and HTML), andRepoContractTestsanti-rot checks.
- Snapshot everything the generators produce with Verify; generators are pure functions of their inputs.
- Generated code is written in string literals, so nothing may leak the line endings of the file holding
them. Split source with
ModuleInitializerGenerator.Lines, which drops the carriage return. - A registry sample has to compile for xUnit v3, NUnit, TUnit, MSTest and Fixie, so it is a method body
only; the generator supplies the signature and the framework's attribute.
GeneratedSolutionTestsproves it by building a solution per plugin. - The bundled fonts in
wwwroot/fontskeep screenshots identical across OSes.RepoContractTests.ShippedFontsCoverRenderedTextfails if rendered text uses a character the fonts don't cover. - Lambda parameters are
_(nested lambdas get a descriptive name). - No single-character locals other than loop counters.
- No abbreviations in identifiers.
- Never return a ternary; use an
ifthat returns, then the fallbackreturn. - No
elseafter a branch that returns.