Skip to content

Fix Banner_NotDisplayedWithNoLogoFlag E2E test (#14307)#15570

Open
JamesNK wants to merge 2 commits intomainfrom
fix-banner-nologo-e2e-test
Open

Fix Banner_NotDisplayedWithNoLogoFlag E2E test (#14307)#15570
JamesNK wants to merge 2 commits intomainfrom
fix-banner-nologo-e2e-test

Conversation

@JamesNK
Copy link
Member

@JamesNK JamesNK commented Mar 25, 2026

Description

Fix the Banner_NotDisplayedWithNoLogoFlag E2E test and re-enable it by removing the [ActiveIssue] attribute.

Root cause: The test was checking for "Commands:" in the help output to confirm the command completed, but help output was refactored to use grouped headings ("App commands:", "Resource management:", etc.) instead of a single "Commands:" heading. This meant the WaitUntilAsync would never find a match and timed out after 30 seconds.

Fix:

  • Replace the "Commands:" check with HelpGroupStrings.HelpHint — the help hint text that appears at the very end of help output, ensuring the full output has rendered before asserting
  • Replace all hardcoded "Welcome to the" strings with RootCommandStrings.BannerWelcomeText resource references
  • Add RootCommandStrings and HelpGroupStrings resource references to the E2E test csproj (following existing pattern for other resource files)
  • Remove [ActiveIssue] to re-enable the test

Fixes #14307

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
  • Does the change require an update in our Aspire docs?
    • Yes
    • No

- Replace hardcoded 'Commands:' check with HelpGroupStrings.HelpHint resource
  (help output now uses grouped headings instead of a single 'Commands:' heading)
- Replace hardcoded 'Welcome to the' with RootCommandStrings.BannerWelcomeText
- Add RootCommandStrings and HelpGroupStrings resource references to csproj
- Remove [ActiveIssue] attribute to re-enable the test
Copilot AI review requested due to automatic review settings March 25, 2026 04:21
@github-actions
Copy link
Contributor

github-actions bot commented Mar 25, 2026

🚀 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 -- 15570

Or

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

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes the Banner_NotDisplayedWithNoLogoFlag Aspire CLI E2E test by updating its help-output completion signal to align with the refactored grouped help headings, and by switching banner text checks to resource-backed strings for stability.

Changes:

  • Update banner text assertions to use RootCommandStrings.BannerWelcomeText instead of hardcoded "Welcome to the".
  • Change the --help completion wait condition from a "Commands:" sentinel to HelpGroupStrings.HelpHint (end-of-help hint text).
  • Add linked resource designer/resx entries for HelpGroupStrings and RootCommandStrings to the E2E test project.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
tests/Aspire.Cli.EndToEnd.Tests/BannerTests.cs Updates wait/assert logic to use resource strings and a more reliable end-of-help marker.
tests/Aspire.Cli.EndToEnd.Tests/Aspire.Cli.EndToEnd.Tests.csproj Adds required linked resource designer/resx files so tests can use RootCommandStrings and HelpGroupStrings.

@github-actions
Copy link
Contributor

Re-running the failed jobs in the CI workflow for this pull request because 2 jobs were identified as retry-safe transient failures in the CI run attempt.
GitHub was asked to rerun all failed jobs for that attempt, and the rerun is being tracked in the rerun attempt.
The job links below point to the failed attempt jobs that matched the retry-safe transient failure rules.

  • Tests / Hosting.Yarp / Hosting.Yarp (windows-latest) - Post-test cleanup steps 'Upload logs, and test results | Copy CLI E2E recordings for upload | Upload CLI E2E recordings | Generate test results summary | Post Checkout code' matched the Windows process initialization failure override allowlist.
  • Tests / Hosting.JavaScript / Hosting.JavaScript (windows-latest) - Post-test cleanup steps 'Upload logs, and test results | Copy CLI E2E recordings for upload | Upload CLI E2E recordings | Generate test results summary | Post Checkout code' matched the Windows process initialization failure override allowlist.

@github-actions
Copy link
Contributor

🎬 CLI E2E Test Recordings — 50 recordings uploaded (commit 41a760d)

View recordings
Test Recording
AddPackageInteractiveWhileAppHostRunningDetached ▶️ View Recording
AddPackageWhileAppHostRunningDetached ▶️ View Recording
AgentCommands_AllHelpOutputs_AreCorrect ▶️ View Recording
AgentInitCommand_DefaultSelection_InstallsSkillOnly ▶️ View Recording
AgentInitCommand_MigratesDeprecatedConfig ▶️ View Recording
AspireAddPackageVersionToDirectoryPackagesProps ▶️ View Recording
AspireUpdateRemovesAppHostPackageVersionFromDirectoryPackagesProps ▶️ View Recording
Banner_DisplayedOnFirstRun ▶️ View Recording
Banner_DisplayedWithExplicitFlag ▶️ View Recording
Banner_NotDisplayedWithNoLogoFlag ▶️ View Recording
CertificatesClean_RemovesCertificates ▶️ View Recording
CertificatesTrust_WithNoCert_CreatesAndTrustsCertificate ▶️ View Recording
CertificatesTrust_WithUntrustedCert_TrustsCertificate ▶️ View Recording
ConfigSetGet_CreatesNestedJsonFormat ▶️ View Recording
CreateAndRunAspireStarterProject ▶️ View Recording
CreateAndRunAspireStarterProjectWithBundle ▶️ View Recording
CreateAndRunEmptyAppHostProject ▶️ View Recording
CreateAndRunJsReactProject ▶️ View Recording
CreateAndRunPythonReactProject ▶️ View Recording
CreateAndRunTypeScriptEmptyAppHostProject ▶️ View Recording
CreateAndRunTypeScriptStarterProject ▶️ View Recording
CreateStartAndStopAspireProject ▶️ View Recording
CreateTypeScriptAppHostWithViteApp ▶️ View Recording
DescribeCommandResolvesReplicaNames ▶️ View Recording
DescribeCommandShowsRunningResources ▶️ View Recording
DetachFormatJsonProducesValidJson ▶️ View Recording
DoctorCommand_DetectsDeprecatedAgentConfig ▶️ View Recording
DoctorCommand_WithSslCertDir_ShowsTrusted ▶️ View Recording
DoctorCommand_WithoutSslCertDir_ShowsPartiallyTrusted ▶️ View Recording
GlobalMigration_HandlesCommentsAndTrailingCommas ▶️ View Recording
GlobalMigration_HandlesMalformedLegacyJson ▶️ View Recording
GlobalMigration_PreservesAllValueTypes ▶️ View Recording
GlobalMigration_SkipsWhenNewConfigExists ▶️ View Recording
GlobalSettings_MigratedFromLegacyFormat ▶️ View Recording
InvalidAppHostPathWithComments_IsHealedOnRun ▶️ View Recording
LogsCommandShowsResourceLogs ▶️ View Recording
PsCommandListsRunningAppHost ▶️ View Recording
PsFormatJsonOutputsOnlyJsonToStdout ▶️ View Recording
PublishWithDockerComposeServiceCallbackSucceeds ▶️ View Recording
RestoreGeneratesSdkFiles ▶️ View Recording
RunWithMissingAwaitShowsHelpfulError ▶️ View Recording
SecretCrudOnDotNetAppHost ▶️ View Recording
SecretCrudOnTypeScriptAppHost ▶️ View Recording
StagingChannel_ConfigureAndVerifySettings_ThenSwitchChannels ▶️ View Recording
StopAllAppHostsFromAppHostDirectory ▶️ View Recording
StopAllAppHostsFromUnrelatedDirectory ▶️ View Recording
StopNonInteractiveMultipleAppHostsShowsError ▶️ View Recording
StopNonInteractiveSingleAppHost ▶️ View Recording
StopWithNoRunningAppHostExitsSuccessfully ▶️ View Recording
TypeScriptAppHostWithProjectReferenceIntegration ▶️ View Recording

📹 Recordings uploaded automatically from CI run #23524951068

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Aspire.Cli.EndToEnd.Tests.BannerTests.Banner_NotDisplayedWithNoLogoFlag

2 participants