Repository navigation
Target dashboard resource cards in DashboardUrlTests breakpoint test - #21656
Conversation
The modernized dashboard (#21412) renders resources as cards by default, so the legacy tr.resource-row locator never matches. Locate the resource card by its exact aria-label and keep the same state assertions. Fixes #21655 Co-authored-by: Copilot <[email protected]>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 21656Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 21656" |
Tests selector1 / 100 PR test projects · 0 PR jobs, from 1 changed file. Selected PR test projects (1 / 100)
Selected PR jobs (0)none How these were chosen — grouped by what changed🧪 Job reasonsnone Selection computed for commit |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the dashboard breakpoint test’s update to target the default Cards layout.
No open issues 🎉
What changed in this PR
Updates the dashboard breakpoint test to target the default Cards layout introduced by #21412, addressing the stale locator reported in #21655.
Changes:
- Replaces the legacy grid-row locator with a resource-card locator matching the exact
aria-label. - Updates the visibility assertion while preserving both state assertions and the existing
.state-column-cellselector.
| File | Description |
|---|---|
tests/Aspire.Hosting.Testing.Tests/DashboardUrlTests.cs |
Targets resource cards when checking state updates while the AppHost is paused at a breakpoint. |
Review effort: Balanced
|
✅ No documentation update needed. docs_optional → test_only. No signals triggered (signal_count == 0). The only changed file, |
Description
DashboardUrlTests.DashboardDisplaysResourceUpdatesWhileAppHostIsPausedAtBreakpointhas failed in every scheduled Outerloop run onmainsince #21412 ("Modernize the dashboard experience") made the Cards layout the default resources view. Before #21412 it passed 12 of 12 runs; since then it has failed 2 of 2 (41158473015, 41263841334).Root cause: the test waits for
tr.resource-row, the legacy grid row. The default view now renders each resource as<article class="resource-card" aria-label="{name}">(ApplicationSummary.razor), so the locator never matches. The aria snapshot in the CI failure shows the card already displayingdashboard-test-resource … State Dashboard test initial. The product is fine; only the locator is stale.Fix: locate the resource card by its exact
aria-label. The state is still read from.state-column-cell, because the card renders the sameStateColumnDisplaycomponent the grid did. Both state assertions are unchanged: the initial custom state, then the updated state published while the AppHost is held at the breakpoint. There are no sleeps, retries, or relaxed timeouts.Fixes #21655
Validation
mainat 1bccada), locally with real DCP, the dashboard, and headless Chromium: fails the same way as CI,Locator expected to be visible … waiting for Locator("tr.resource-row")…. The snapshot shows the Cards region containingdashboard-test-resource … Dashboard test initial.outerloop_tests / Hosting.Testing (ubuntu-latest)passed (job 124868319332: total 1, succeeded 1, skipped 0). That job runs only this outerloop test; onmainit reports total 1, failed 1.Hosting.Testing (windows-latest)also passed.mainrun for unrelated, already-tracked reasons (Local .NET 11 starter-template validation fails during coordinated project build #21413/[automated] test(templates): Fix child-project SDK isolation and dashboard checks #21423, MongoDB family).Final Resultscheck shows as failed on this commit. It is not one of this PR's required checks.Out of scope
TemplateTestsBase.CheckDashboardHasResourcesActualAsync(.main-grid tr.resource-row) reads the same legacy grid and affects the Templates outerloop tests. That path is tracked by #21413/#21423.Checklist
🤖 Posted by AspireAgent (AI Agent)