Skip to content

Fixed Test case failure in PR 31327#31378

Merged
jfversluis merged 1 commit intodotnet:inflight/candidatefrom
Vignesh-SF3580:fix-31327Failure
Aug 28, 2025
Merged

Fixed Test case failure in PR 31327#31378
jfversluis merged 1 commit intodotnet:inflight/candidatefrom
Vignesh-SF3580:fix-31327Failure

Conversation

@Vignesh-SF3580
Copy link
Contributor

@Vignesh-SF3580 Vignesh-SF3580 commented Aug 28, 2025

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!

Issue Details

In the failed test AppDoesntCrashWhenSettingNewTitleViewOnExistingPage, the TitleView was updated in the OnAppearing method. When popping the page using PopAsync, the OnAppearing event is triggered twice with my fix, whereas previously it was triggered only once: once from FireAppearing and once from CurrentPageChanged.
This additional trigger causes the title to mismatch the expected value, resulting in the test failure.

Root Cause

The fix moves FireAppearing to after RemoveFromInnerChildren(page), but at that point InternalChildren.Last() has already changed. Currently, StackDepth - 2 is calculated based on the original stack depth. Once the popped page is removed from stack, accessing InternalChildren[StackDepth - 2] is not valid.

Description of Change

Remove the page first, then use InternalChildren.Last(); directly to get the correct page that should appear.

Regressed PR: #28666

Fixes AppDoesntCrashWhenSettingNewTitleViewOnExistingPage test failure in PR: #31327

Screenshots

image image image

@dotnet-policy-service dotnet-policy-service bot added community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration labels Aug 28, 2025
@Vignesh-SF3580 Vignesh-SF3580 marked this pull request as ready for review August 28, 2025 12:31
@Vignesh-SF3580 Vignesh-SF3580 requested a review from a team as a code owner August 28, 2025 12:31
@Vignesh-SF3580 Vignesh-SF3580 requested review from StephaneDelcroix and jsuarezruiz and removed request for a team August 28, 2025 12:31
@jfversluis jfversluis merged commit 79ebb36 into dotnet:inflight/candidate Aug 28, 2025
1 check passed
@github-actions github-actions bot locked and limited conversation to collaborators Sep 28, 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 test-flight

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants