Skip to content

Conversation

@Shalini-Ashokan
Copy link
Contributor

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Root Cause

The Bugzilla41842 test was using new Page() which is a base class and should not be instantiated directly. This caused crashes.

Description of Change

Fixed the failing Bugzilla41842 test case by replacing raw Page() instantiations with proper ContentPage() objects.

Validated the behavior in the following platforms

  • Android
  • Windows
  • iOS
  • Mac

Issues Fixed

Fixes #21205

Output ScreenShot

Before After
BeforeFix.mov
AfterFix.mov

@jsuarezruiz
Copy link
Contributor

/azp run MAUI-UITests-public

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Shalini-Ashokan Shalini-Ashokan marked this pull request as ready for review October 7, 2025 12:20
Copilot AI review requested due to automatic review settings October 7, 2025 12:20
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 previously crashing Bugzilla41842 UI test by replacing invalid base Page() instantiations with ContentPage(), and re-enabling the test. Key adjustments include updating the HostApp sample to use valid ContentPage instances and reactivating the shared test with a platform-specific assertion.

  • Replace raw Page() usages with ContentPage() to avoid crashes when assigning Flyout/Detail multiple times.
  • Reactivate previously ignored test and add platform conditional assertion.
  • Add AutomationIds to validate behavior in UI test.

Reviewed Changes

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

File Description
src/Controls/tests/TestCases.HostApp/Issues/Bugzilla/Bugzilla41842.cs Replaces Page() with ContentPage(), adds labeled content and AutomationIds for validation.
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Bugzilla/Bugzilla41842.cs Re-enables test, adds platform-specific WaitForElement logic.

Comment on lines +20 to +24
#if MACCATALYST
App.WaitForElement("FlyoutLabel");
#else
App.WaitForElement("Success");
#endif
Copy link

Copilot AI Oct 7, 2025

Choose a reason for hiding this comment

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

[nitpick] The platform conditional causes different assertions without any in-code explanation; adding a brief comment (e.g., why MacCatalyst cannot validate the Detail label) would improve clarity for future maintainers.

Copilot uses AI. Check for mistakes.
Comment on lines +20 to +24
#if MACCATALYST
App.WaitForElement("FlyoutLabel");
#else
App.WaitForElement("Success");
#endif
Copy link

Copilot AI Oct 7, 2025

Choose a reason for hiding this comment

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

On MacCatalyst the test only waits for the Flyout label and never validates that the second Detail assignment (the core of the regression scenario) succeeded; this reduces coverage of the original issue on that platform. Consider asserting both that no crash occurred and that the Detail 'Success' label is eventually present (or document why it cannot be).

Copilot uses AI. Check for mistakes.
{
}

public override string Issue => "Set FlyoutPage.Detail = New Page() twice will crash the application when set FlyoutLayoutBehavior = FlyoutLayoutBehavior.Split";
Copy link

Copilot AI Oct 7, 2025

Choose a reason for hiding this comment

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

The Issue description still references 'New Page()' even though the test now uses ContentPage instances; updating the wording to match the current scenario will avoid confusion.

Suggested change
public override string Issue => "Set FlyoutPage.Detail = New Page() twice will crash the application when set FlyoutLayoutBehavior = FlyoutLayoutBehavior.Split";
public override string Issue => "Set FlyoutPage.Detail = new ContentPage() twice will crash the application when set FlyoutLayoutBehavior = FlyoutLayoutBehavior.Split";

Copilot uses AI. Check for mistakes.
@karthikraja-arumugam karthikraja-arumugam added community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration labels Oct 22, 2025
public void Bugzilla41842Test()
{
#if MACCATALYST
App.WaitForElement("FlyoutLabel");
Copy link
Contributor

Choose a reason for hiding this comment

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

The test is passing on CI.

@PureWeen PureWeen changed the base branch from main to inflight/current October 31, 2025 20:32
@PureWeen PureWeen merged commit 0af134f into dotnet:inflight/current Oct 31, 2025
75 of 79 checks passed
PureWeen pushed a commit that referenced this pull request Nov 11, 2025
…ge (#31862)

* Modified the test

* Modified the test case
github-actions bot pushed a commit that referenced this pull request Nov 11, 2025
…ge (#31862)

* Modified the test

* Modified the test case
github-actions bot pushed a commit that referenced this pull request Nov 14, 2025
…ge (#31862)

* Modified the test

* Modified the test case
github-actions bot pushed a commit that referenced this pull request Nov 15, 2025
…ge (#31862)

* Modified the test

* Modified the test case
github-actions bot pushed a commit that referenced this pull request Nov 15, 2025
…ge (#31862)

* Modified the test

* Modified the test case
github-actions bot pushed a commit that referenced this pull request Nov 18, 2025
…ge (#31862)

* Modified the test

* Modified the test case
github-actions bot pushed a commit that referenced this pull request Nov 18, 2025
…ge (#31862)

* Modified the test

* Modified the test case
github-actions bot pushed a commit that referenced this pull request Nov 18, 2025
…ge (#31862)

* Modified the test

* Modified the test case
github-actions bot pushed a commit that referenced this pull request Nov 20, 2025
…ge (#31862)

* Modified the test

* Modified the test case
github-actions bot pushed a commit that referenced this pull request Nov 20, 2025
…ge (#31862)

* Modified the test

* Modified the test case
@github-actions github-actions bot locked and limited conversation to collaborators Dec 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Testing] Set FlyoutPage.Detail = New Page() twice will crash the application when set FlyoutLayoutBehavior = FlyoutLayoutBehavior.Split

4 participants