Skip to content

[Testing] Fix flaky UITests failing sometimes 3#27277

Merged
rmarinho merged 6 commits intomainfrom
fix-flaky-uitests-3
Feb 4, 2025
Merged

[Testing] Fix flaky UITests failing sometimes 3#27277
rmarinho merged 6 commits intomainfrom
fix-flaky-uitests-3

Conversation

@jsuarezruiz
Copy link
Copy Markdown
Contributor

Description of Change

  • VerifyInitialEntryReturnTypeChange. Capture depends on a blinking Entry cursor. Sometimes it happens, sometimes it doesn't. Fixed test, cursor is not captured in the image.

@jsuarezruiz jsuarezruiz added area-testing Unit tests, device tests testing-flakiness labels Jan 22, 2025
Copilot AI review requested due to automatic review settings January 22, 2025 12:04
@jsuarezruiz jsuarezruiz requested a review from a team as a code owner January 22, 2025 12:04
Copy link
Copy Markdown
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.

Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.

Files not reviewed (1)
  • src/Controls/tests/TestCases.HostApp/Issues/Issue21109.xaml: Language not supported
Comments suppressed due to low confidence (1)

src/Controls/tests/TestCases.HostApp/Controls/NoCaretEntry.cs:3

  • Ensure that there are tests covering the behavior of the NoCaretEntry class.
public class NoCaretEntry : Entry

#elif IOS
handler.PlatformView.TintColor = UIKit.UIColor.Clear;
#endif
}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Cannot change the Cursor color in WinUI. Intentional design decision and are not planning to change that. microsoft/microsoft-ui-xaml#8207

if (view is NoCaretEntry)
{
#if ANDROID
handler.PlatformView.SetCursorVisible(false);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

IOS already have a Platform Specific to set the Entry CursorColor https://learn.microsoft.com/en-us/dotnet/maui/ios/platform-specifics/entry-cursor-color?view=net-maui-9.0. We can create another Platform Specific doing the same on Android.

{
public UITestEntryHandler() : base(EntryHandler.Mapper)
{
Mapper.AppendToMapping(nameof(IUITestEntry.IsCursorVisible), (handler, entry) =>
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Should we create a Platform Specific for Android and iOS adding this property?

@rmarinho rmarinho merged commit 88499e1 into main Feb 4, 2025
@rmarinho rmarinho deleted the fix-flaky-uitests-3 branch February 4, 2025 13:08
@github-actions github-actions bot locked and limited conversation to collaborators Mar 7, 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 testing-flakiness

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants