Skip to content

Refactor dashboard automation tests and improve configuration handling #4238

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

IEvangelist
Copy link
Member

Summary

Refactor dashboard automation tests and improve configuration handling

Fixes #4237

@IEvangelist IEvangelist requested a review from Copilot August 9, 2025 20:16
Copy link
Contributor

@Copilot 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

Refactors the .NET Aspire dashboard automation tests to improve configuration handling and fix various issues with test stability and reliability.

  • Improved configuration value retrieval with default fallback values
  • Enhanced URL resolution using proper event-driven mechanisms
  • Increased test timeout and improved error handling for better reliability

Reviewed Changes

Copilot reviewed 8 out of 24 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
Program.cs Updated configuration value retrieval to use overload with default value
PlaywrightTestsBase.cs Refactored URL resolution using event-driven approach and added error handling
PlaywrightFixture.cs Increased default timeout from 10 to 30 seconds
FluentDataGridSelector.cs Added debugger display attribute for better debugging experience
PageExtensions.cs Enhanced login method with network idle wait condition
DashboardSelectors.cs Updated selector to handle both C: and E: drive paths
CaptureImages.cs Simplified test code and improved reliability with forced clicks
AppHostTestFixture.cs Improved configuration handling and added unsecured transport option

if (addresses is not null)
{

}
Copy link
Preview

Copilot AI Aug 9, 2025

Choose a reason for hiding this comment

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

This code block from lines 40-45 appears to be unused dead code. The server variable and addresses are retrieved but never used, and the block is empty. This should be removed to improve code clarity.

Suggested change
}

Copilot uses AI. Check for mistakes.

@@ -1,5 +1,7 @@
namespace Aspire.Dashboard.ScreenCapture;

Copy link
Preview

Copilot AI Aug 9, 2025

Choose a reason for hiding this comment

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

[nitpick] The empty line at the beginning of the file should be removed to maintain consistent file formatting.

Suggested change


Copilot uses AI. Check for mistakes.


[DebuggerDisplay($"{{{nameof(GetDebuggerDisplay)}(),nq}}")]
Copy link
Preview

Copilot AI Aug 9, 2025

Choose a reason for hiding this comment

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

The DebuggerDisplay attribute is missing the required using statement for System.Diagnostics. This will cause a compilation error.

Copilot uses AI. Check for mistakes.

DashboardSelectors.SplitPanels, DashboardSelectors.MedianId, (0, 20));
//await page.AdjustSplitPanelsGridTemplateAsync();
//await page.ClickAndDragShadowRootElementAsync(
// DashboardSelectors.SplitPanels, DashboardSelectors.MedianId, (0, 20));
Copy link
Preview

Copilot AI Aug 9, 2025

Choose a reason for hiding this comment

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

Multiple lines of commented-out code (lines 197, 199-201) should be removed rather than left as comments. If this code might be needed later, consider using version control history instead.

Copilot uses AI. Check for mistakes.

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.

UX automation
1 participant