Fix Loom.Web.Tests: SQLite test factory + refresh stale assertions#16
Merged
Conversation
…rtions
LoomWebFactory previously registered EF InMemory on top of the
SqlServer provider that AddLoomInfrastructure wires up, which EF
rejects ('multiple providers registered'). The factory now hands
AddLoomInfrastructure a SQLite connection string (per-factory temp
file), driving the existing isSqlite branch and the bootstrapper's
EnsureCreatedAsync path. No production changes.
HostSmokeTests' empty-state and not-found body assertions were stale
relative to the current rendering mode (InteractiveServer with
prerender:false): the page body isn't SSR'd, so initial GETs return
layout chrome only, and unknown routes return a bare 404. Updated
assertions accordingly.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
LoomWebFactoryfrom EF InMemory swap to a per-factory SQLite temp file viaConnectionStrings:Loom. Eliminates the dual-provider error (AddLoomInfrastructureregisters SqlServer; the swap left both providers in DI), and reuses the existingisSqlite/EnsureCreatedAsyncpaths in ServiceCollectionExtensions and LoomBootstrapper.HostSmokeTestsassertions: pages useInteractiveServerRenderMode(prerender: false), so the home GET returns layout chrome only and unknown routes return a bare 404. No production changes.Test plan
dotnet test tests/Loom.Web.Tests/Loom.Web.Tests.csproj --nologo— 3/3 passingdotnet test --nologo -m:1— full suite: 164/164 passing across 9 projects🤖 Generated with Claude Code