Skip to content

Target dashboard resource cards in DashboardUrlTests breakpoint test - #21656

Merged
David Fowler (davidfowl) merged 1 commit into
mainfrom
aspireagent/dashboardurl-cards-locator
Nov 2, 2026
Merged

David Fowler (davidfowl) merged 1 commit into
mainfrom
aspireagent/dashboardurl-cards-locator

Conversation

@davidfowl

@davidfowl David Fowler (davidfowl) commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator

Description

DashboardUrlTests.DashboardDisplaysResourceUpdatesWhileAppHostIsPausedAtBreakpoint has failed in every scheduled Outerloop run on main since #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 displaying dashboard-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 same StateColumnDisplay component 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

  • Before the fix (main at 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 containing dashboard-test-resource … Dashboard test initial.
  • After the fix: passes in about 30s. It passed 50 of 50 consecutive local runs (27–33s each).
  • Outerloop CI on this branch: I dispatched run 41310885927 on 7b9e3a3.

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

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
    • No

🤖 Posted by AspireAgent (AI Agent)

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]>
@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 21656

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 21656"

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Tests selector

1 / 100 PR test projects · 0 PR jobs, from 1 changed file.

Selected PR test projects (1 / 100)

Aspire.Hosting.Testing.Tests

Selected PR jobs (0)

none


How these were chosen — grouped by what changed

🧪 tests/Aspire.Hosting.Testing.Tests/DashboardUrlTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Testing.Tests

Job reasons

none


Selection computed for commit 7b9e3a3.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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-cell selector.
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

@davidfowl
David Fowler (davidfowl) merged commit 00d1e66 into main Nov 2, 2026
84 of 92 checks passed
@microsoft-github-policy-service microsoft-github-policy-service Bot added this to the 17.0 milestone Nov 2, 2026
@aspire-repo-bot

Copy link
Copy Markdown
Contributor

✅ No documentation update needed.

docs_optional → test_only. No signals triggered (signal_count == 0). The only changed file, tests/Aspire.Hosting.Testing.Tests/DashboardUrlTests.cs, matches tests/**.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DashboardUrlTests.DashboardDisplaysResourceUpdatesWhileAppHostIsPausedAtBreakpoint fails since dashboard Cards layout became default

3 participants