[Testing] Fix for flaky UITests in CI that occasionally fail - 3#27905
[Testing] Fix for flaky UITests in CI that occasionally fail - 3#27905jfversluis merged 5 commits intomainfrom unknown repository
Conversation
|
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. |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
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. | |||
There was a problem hiding this comment.
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.
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue25943.cs
Outdated
Show resolved
Hide resolved
| @@ -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 | |||
There was a problem hiding this comment.
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.
|
/rebase |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
@jfversluis I have resolved the conflicts. Please kindly review and share your feedbacks |
|
Azure Pipelines successfully started running 3 pipeline(s). |
Description of Change
This pull request includes various changes to the test cases in the
src/Controls/tests/TestCases.Shared.Tests/Testsdirectory, primarily focusing on improving test stability and addressing platform-specific issues. The most important changes include modifying test methods to remove unnecessaryasyncandawaitkeywords, adding platform-specific handling to address CI flakiness, and updating conditional compilation directives.src/Controls/tests/TestCases.Shared.Tests/Tests/CarouselViewUITests.cs: Removed unnecessaryasyncandawaitkeywords from multiple test methods to simplify the code and potentially improve test stability. [1] [2] [3]src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue24574.cs: Added a retry mechanism for double-tap actions on Android to address CI flakiness.src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue25943.cs: Added a wait for the "OK" button on Android to ensure the date picker dialog is fully loaded before interacting with it.src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/TimePickerUITest.cs: Updated the conditional compilation directive to include iOS due to inconsistent picker popup layout.src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/XFIssue/Issue1614.cs: Updated the conditional compilation directive to include Android due to an issue with the cancel button not displaying after orientation changes.src/Controls/tests/TestCases.HostApp/Issues/Issue19152.xaml: Updated theEntrycontrol to use a customUITestEntrycontrol with additional properties.src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue19152.cs: Added a sleep delay to ensure the keyboard appears before dismissing it on Android.TestCases