Skip to content
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

[Testing] Fix for flaky UITests in CI that occasionally fail - 3 #27905

Merged
merged 5 commits into from
Feb 25, 2025

Conversation

NafeelaNazhir
Copy link
Contributor

Description of Change

This pull request includes various changes to the test cases in the src/Controls/tests/TestCases.Shared.Tests/Tests directory, primarily focusing on improving test stability and addressing platform-specific issues. The most important changes include modifying test methods to remove unnecessary async and await keywords, adding platform-specific handling to address CI flakiness, and updating conditional compilation directives.

TestCases

  • Issue19152
  • CarouselViewUITests
  • Issue24574
  • Issue25943
  • TimePickerUITest
  • Issue1614

Copy link
Contributor

Hey there @NafeelaNazhir! 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 community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration labels Feb 19, 2025
@NafeelaNazhir NafeelaNazhir added area-testing Unit tests, device tests and removed community ✨ Community Contribution labels Feb 19, 2025
@NafeelaNazhir NafeelaNazhir changed the title Enabled flaky testcases 3 [Testing] Fix for flaky UITests in CI that occasionally fail - 3 Feb 19, 2025
@anandhan-rajagopal anandhan-rajagopal added the community ✨ Community Contribution label Feb 19, 2025
@PureWeen
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@NafeelaNazhir NafeelaNazhir marked this pull request as ready for review February 20, 2025 11:03
@Copilot Copilot bot review requested due to automatic review settings February 20, 2025 11:03
@NafeelaNazhir NafeelaNazhir requested a review from a team as a code owner February 20, 2025 11:03
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.

Copilot reviewed 9 out of 9 changed files in this pull request and generated 6 comments.

Comments suppressed due to low confidence (1)

src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue19152.cs:22

  • [nitpick] Consider replacing the fixed Thread.Sleep delay with a more robust wait method (e.g. waiting for the keyboard element) to reduce potential flakiness on slower devices.
Thread.Sleep(500); // Wait for the keyboard to appear

@@ -1,4 +1,5 @@
#if TEST_FAILS_ON_CATALYST && TEST_FAILS_ON_WINDOWS //The test fails on Windows and MacCatalyst because the SetOrientation method, which is intended to change the device orientation, is only supported on mobile platforms Android and iOS.
#if TEST_FAILS_ON_CATALYST && TEST_FAILS_ON_WINDOWS && TEST_FAILS_ON_ANDROID //The test fails on Windows and MacCatalyst because the SetOrientation method, which is intended to change the device orientation, is only supported on mobile platforms Android and iOS.
Copy link
Preview

Copilot AI Feb 20, 2025

Choose a reason for hiding this comment

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

Ensure that the inclusion of the TEST_FAILS_ON_ANDROID flag is documented either in the test case or related docs to clarify its purpose for addressing the cancel button display issue.

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

@@ -1,4 +1,5 @@
#if TEST_FAILS_ON_CATALYST // TimePicker not opens the dialog, issue: https://github.com/dotnet/maui/issues/10827
#if TEST_FAILS_ON_CATALYST && TEST_FAILS_ON_IOS // TimePicker not opens the dialog, issue: https://github.com/dotnet/maui/issues/10827
Copy link
Preview

Copilot AI Feb 20, 2025

Choose a reason for hiding this comment

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

Ensure that the updated conditional directive for iOS accurately targets devices with inconsistent picker popup layouts and that associated documentation is updated to reflect this change.

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

@jsuarezruiz
Copy link
Contributor

/rebase

@github-actions github-actions bot force-pushed the enabled-flaky-testcases-3 branch from 16a66c2 to cda5bb0 Compare February 21, 2025 11:36
@jsuarezruiz
Copy link
Contributor

jsuarezruiz commented Feb 21, 2025

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

Copy link
Member

@jfversluis jfversluis left a comment

Choose a reason for hiding this comment

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

Resolve conflicts please

@anandhan-rajagopal
Copy link
Contributor

anandhan-rajagopal commented Feb 24, 2025

Resolve conflicts please

@jfversluis I have resolved the conflicts. Please kindly review and share your feedbacks

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@jfversluis jfversluis merged commit 2f3bb5f into dotnet:main Feb 25, 2025
123 checks passed
@jfversluis jfversluis added this to the .NET 9 SR5 milestone Feb 25, 2025
tj-devel709 pushed a commit that referenced this pull request Mar 3, 2025
)

* enabled flaky UITest cases

* updated changes

* updated changes

* Updated Image

* updated Android image
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-testing Unit tests, device tests community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants