From b58222d43a080da80598ab5088524d9fac3c20c7 Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Wed, 30 Sep 2026 19:57:36 -0400 Subject: [PATCH 1/2] test(cli): provision Java for outerloop tests The outerloop-only Maven reactor tests compile Java 21 fixtures, but the CLI test project did not advertise a JDK requirement. Specialized CI jobs could therefore select an older Java version and fail with: error: release version 21 not supported Set RequiresJava only for outerloop runs so regular CLI jobs do not provision Java unnecessarily. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- tests/Aspire.Cli.Tests/Aspire.Cli.Tests.csproj | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/Aspire.Cli.Tests/Aspire.Cli.Tests.csproj b/tests/Aspire.Cli.Tests/Aspire.Cli.Tests.csproj index 582a591eb4b..1442cf2d9ce 100644 --- a/tests/Aspire.Cli.Tests/Aspire.Cli.Tests.csproj +++ b/tests/Aspire.Cli.Tests/Aspire.Cli.Tests.csproj @@ -11,6 +11,9 @@ false false true + + true From dc6669c77fc5cbb6645f19133dc4c742bccc843e Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Wed, 30 Sep 2026 19:57:36 -0400 Subject: [PATCH 2/2] test(dashboard): fix terminal outerloop interactions Dashboard Playwright tests initialize the shared layout, which now subscribes to terminal updates even in scenarios that do not configure terminals. The mock threw during that initialization, and terminal-dock tests still targeted the header button removed by #20528. Return a completed empty terminal stream from the shared mock. Open the empty dock through AppHost activation and use the settings button as the surviving focus target after collapse. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .../Playwright/Infrastructure/MockDashboardClient.cs | 6 +++++- .../Integration/Playwright/TerminalDockTests.cs | 9 ++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/tests/Aspire.Dashboard.Tests/Integration/Playwright/Infrastructure/MockDashboardClient.cs b/tests/Aspire.Dashboard.Tests/Integration/Playwright/Infrastructure/MockDashboardClient.cs index 30f98e49848..9f067072858 100644 --- a/tests/Aspire.Dashboard.Tests/Integration/Playwright/Infrastructure/MockDashboardClient.cs +++ b/tests/Aspire.Dashboard.Tests/Integration/Playwright/Infrastructure/MockDashboardClient.cs @@ -53,7 +53,11 @@ public MockDashboardClient(IReadOnlyList? resources = null) public Task ExecuteResourceCommandAsync(string resourceName, string resourceType, CommandViewModel command, ExecuteResourceCommandOptions options, CancellationToken cancellationToken) => throw new NotImplementedException(); public Task UploadFileAsync(Stream fileStream, string fileName, long expectedSize, int interactionId, string inputName, CancellationToken cancellationToken) => throw new NotImplementedException(); public Task AttachTerminalAsync(string terminalId, CancellationToken cancellationToken) => throw new NotImplementedException(); - public IAsyncEnumerable SubscribeTerminalsAsync(CancellationToken cancellationToken) => throw new NotImplementedException(); + public async IAsyncEnumerable SubscribeTerminalsAsync([EnumeratorCancellation] CancellationToken cancellationToken) + { + await Task.CompletedTask; + yield break; + } public Task CloseTerminalAsync(string terminalId, CancellationToken cancellationToken) => throw new NotImplementedException(); public async IAsyncEnumerable> SubscribeConsoleLogs(string resourceName, [EnumeratorCancellation] CancellationToken cancellationToken) { diff --git a/tests/Aspire.Dashboard.Tests/Integration/Playwright/TerminalDockTests.cs b/tests/Aspire.Dashboard.Tests/Integration/Playwright/TerminalDockTests.cs index efb2c70c815..082cf2841c8 100644 --- a/tests/Aspire.Dashboard.Tests/Integration/Playwright/TerminalDockTests.cs +++ b/tests/Aspire.Dashboard.Tests/Integration/Playwright/TerminalDockTests.cs @@ -24,10 +24,13 @@ public async Task EmptyDock_ResizingPreservesContentInPriorityOrder() { await RunTestAsync(async page => { - await fixture.StartSessionAsync(); + var (updates, _) = await fixture.StartSessionAsync(); await page.SetViewportSizeAsync(1280, 900); await page.GotoAsync("/").DefaultTimeout(); - await page.GetByRole(AriaRole.Button, new() { Name = "Toggle terminal (`)", Exact = true }).ClickAsync(); + await updates.Writer.WriteAsync(new WatchTerminalsUpdate + { + Snapshot = new TerminalDescriptorList { ActivatedTerminalId = "missing" } + }); var panel = page.Locator(".terminal-dock-panel"); var heading = panel.GetByRole(AriaRole.Heading, new() { Name = "No docked terminals", Exact = true }); var hint = panel.Locator(".terminal-dock-panel-hint"); @@ -321,7 +324,7 @@ await RunTestAsync(async page => if (hideDock) { await page.Locator(".terminal-dock-collapse").ClickAsync(); - focusTarget = page.GetByRole(AriaRole.Button, new() { Name = "Toggle terminal (`)", Exact = true }); + focusTarget = page.Locator("#dashboard-settings-button"); } else {