Skip to content

Re-enabled flaky UI test TextInEditorShouldScroll #29167

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 4 commits into
base: main
Choose a base branch
from

Conversation

NirmalKumarYuvaraj
Copy link
Contributor

Description of Change

  • Enhanced the test TextInEditorShouldScroll to verify scrolling behavior using a yPositionLabel instead of relying on screenshot validation. This ensures the test is more deterministic and avoids flakiness in CI, particularly for macOS.

Issues Fixed

Fixes #29025

@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Apr 24, 2025
Copy link
Contributor

Hey there @@NirmalKumarYuvaraj! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@dotnet-policy-service dotnet-policy-service bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Apr 24, 2025
@jsuarezruiz
Copy link
Contributor

/azp run MAUI-UITests-public

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@anandhan-rajagopal anandhan-rajagopal added the area-testing Unit tests, device tests label Apr 24, 2025
#if MACCATALYST
App.ScrollDown("editor"); // To make sure the editor is scrolled down
var yPos = yPosLabel.GetText();
Assert.That(yPos,Is.GreaterThan("0")); // The Y position should be greater than 0 after scrolling down
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a note — since this is a UITest, ideally we should verify that scrolling is visually reflected in the UI. Relying on ContentOffset.Y > 0 introduces a logical check, but it doesn’t fully guarantee a visible change occurred on screen.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bhavanesh2001 , The test is to check whether the editor is scrollable or not. The previous UI test was flaky because the content was scrolled a pixel off from its original position. So instead of relying on a visual confirmation, I went with an alternative approach. The Y position label text will be updated only if the editor is scrolled. Otherwise it stays as 0.

This is added only to MAC to resolve flaky issue on CI.

@NirmalKumarYuvaraj NirmalKumarYuvaraj marked this pull request as ready for review April 24, 2025 12:10
@NirmalKumarYuvaraj NirmalKumarYuvaraj requested a review from a team as a code owner April 24, 2025 12:10
@jsuarezruiz
Copy link
Contributor

/azp run MAUI-UITests-public

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-testing Unit tests, device tests community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration testing-flakiness
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Testing] Reenable flaky UI test TextInEditorShouldScroll
4 participants