tests: Dashboard.Ui bUnit component tests (Phase 1 of #126) - #132
Merged
Conversation
Adds bUnit 2.5.3 + 18 component tests covering the Razor components called out in the issue's acceptance criteria: - Login.razor (4 tests): sign-in render, error-query-param alert, no-error-default, auth-disabled redirect to root. - MainLayout.razor (5 tests): renders when auth disabled, renders when authenticated, logout button visibility, unauthenticated redirect to /login. - HistoryTab.razor (6 tests): loads on init, purge-button visibility (readonly + zero-records), writable+has-records shows purge, error-alert on load failure, expand control for exception rows. - Home.razor (3 tests): single-source redirect, source-not-found alert, multi-source grouped view. Shared BunitTestBase registers MudBlazor services and a loose JSInterop mode; RenderWithMudProvider<T>() wraps components that require MudPopoverProvider (MudSelect, MudTable, etc.) in the render tree. Phase 2 (Playwright E2E on a new Jenkins stage) will follow in a separate commit. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #132 +/- ##
==========================================
+ Coverage 89.63% 89.91% +0.28%
==========================================
Files 993 993
Lines 29297 29297
Branches 2369 2369
==========================================
+ Hits 26259 26343 +84
+ Misses 2194 2120 -74
+ Partials 844 834 -10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
blehnen
marked this pull request as ready for review
April 21, 2026 20:16
This was referenced Apr 21, 2026
blehnen
added a commit
that referenced
this pull request
Apr 21, 2026
Captures four findings from PRs #132 / #133: - Microsoft.Playwright.MSTest pins MSTest 2.x — use raw Microsoft.Playwright - WebApplicationFactory + Playwright is a dead end on Blazor Server - Blazor Server OnAfterRender redirects race the SignalR circuit in E2E - Jenkins 'docker' label means agent IS a container (no docker-in-docker) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
blehnen
added a commit
that referenced
this pull request
Jul 21, 2026
Reconciliation finished: the Codecov/badge gap is NOT a pipeline defect. Codecov excludes partially-covered lines from hits; ReportGenerator counts them as covered. 867 partial lines on master account for the entire ~2.5 point difference (87.45% vs 90.04% on identical denominators). Master build #132 was fully green with all 24 coverage inputs merged and still read 87.45%, which rules out the stale-upload and missing-stage theories recorded earlier in this doc. Coverage also did not erode gradually. Removing Dashboard.Ui (1,303 lines at 23.6%) from today's totals reproduces the historical figure exactly (29,066/32,282 = 90.04%), so one untested Blazor project accounts for the whole decline from the 90.25% Codecov reported in 2024. Changes: - Codecov is now documented as the authoritative number (it gates PRs). - project status: auto/2% -> auto/0%. Coverage may rise or stay flat but never drop below the parent commit. The old 2% slack is what let the number drift down unnoticed, since auto rebaselines every merge. - Documented that reaching 90% requires Dashboard.Ui specifically, and that partial lines are a cheaper secondary lever. Co-Authored-By: Claude Opus 4.8 <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
Phase 1 of #126 — adds bUnit 2.5.3 and 18 component tests covering Razor components that were sitting at 0% coverage.
Coverage added
Pages/Login.razor?error=1alert, no-error default, auth-disabled redirectLayout/MainLayout.razorShared/HistoryTab.razorPages/Home.razorShared
BunitTestBaseregisters MudBlazor services + loose JSInterop;RenderWithMudProvider<T>()wraps components that needMudPopoverProviderin the render tree (MudSelect / MudTable internals).Test plan
dotnet build— clean on net10.0 + net8.0dotnet test Source/DotNetWorkQueue.Dashboard.Ui.Tests— 66/66 passing on both TFMs (48 existing + 18 new)Phase 2 (incoming on this branch)
DotNetWorkQueue.Dashboard.Ui.E2E.Testsproject with Playwright + WebApplicationFactorymcr.microsoft.com/playwright/dotnetimageMarked draft until Jenkins is green and Phase 2 lands.
🤖 Generated with Claude Code