Skip to content

Fix components test and remove added padding/margin on tabs - #7841

Merged
James Newton-King (JamesNK) merged 3 commits into
mainfrom
jamesnk/fix-test
Mar 3, 2025
Merged

James Newton-King (JamesNK) merged 3 commits into
mainfrom
jamesnk/fix-test

Conversation

@JamesNK

@JamesNK James Newton-King (JamesNK) commented Mar 1, 2025 •

Copy link
Copy Markdown
Member

Fixes #7839

  • I couldn't repo the flaky test locally with 1000 test runs. I think it's a timing issue which should be solved by this wait.
  • Update to FluentUI 4.15.0 added some padding/margin on tabs. Removed by setting size to a custom value null.

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.

PR Overview

This PR addresses a flaky test issue and removes undesired added padding/margin on FluentUI tabs by introducing an explicit wait and overriding the default tab size.

  • Removes the ActiveIssue attribute and adds a wait for the clear menu element in the ConsoleLogsTests.
  • Overrides the default FluentTabs size in Resources.razor and ChartContainer.razor using a custom cast value.

Reviewed Changes

File Description
tests/Aspire.Dashboard.Components.Tests/Pages/ConsoleLogsTests.cs Removed flaky test marker and added explicit wait for element
src/Aspire.Dashboard/Components/Pages/Resources.razor Updated FluentTabs to remove undesired padding/margin via custom Size attribute
src/Aspire.Dashboard/Components/Controls/Chart/ChartContainer.razor Updated FluentTabs with the same Size override to fix layout issues

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (2)

src/Aspire.Dashboard/Components/Pages/Resources.razor:105

  • [nitpick] The use of '(TabSize)int.MinValue' is not self-explanatory; consider defining a named constant or adding a comment to clarify its purpose for removing added padding/margin.
<FluentTabs Class="resources-tab-header" ActiveTabId="@($"tab-{PageViewModel.SelectedViewKind}")" OnTabChange="@OnTabChangeAsync" Size="(TabSize)int.MinValue">

src/Aspire.Dashboard/Components/Controls/Chart/ChartContainer.razor:33

  • [nitpick] The custom cast to '(TabSize)int.MinValue' should be documented or replaced with a clearly named constant to maintain clarity and ease of maintenance.
<FluentTabs ActiveTabId="@($"tab-{ActiveView}")" OnTabChange="@OnTabChangeAsync" Size="(TabSize)int.MinValue">

@JamesNK
James Newton-King (JamesNK) enabled auto-merge (squash) March 3, 2025 01:29
@JamesNK
James Newton-King (JamesNK) deleted the jamesnk/fix-test branch March 3, 2025 03:09
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 2, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flaky test: ClearLogEntries_AllResources_LogsFilteredOut

4 participants