Skip to content

[Testing] Refactoring Feature Matrix UITest Cases for Entry Control#34632

Open
LogishaSelvarajSF4525 wants to merge 9 commits intodotnet:mainfrom
LogishaSelvarajSF4525:refactoring-entry-feature
Open

[Testing] Refactoring Feature Matrix UITest Cases for Entry Control#34632
LogishaSelvarajSF4525 wants to merge 9 commits intodotnet:mainfrom
LogishaSelvarajSF4525:refactoring-entry-feature

Conversation

@LogishaSelvarajSF4525
Copy link
Copy Markdown
Contributor

@LogishaSelvarajSF4525 LogishaSelvarajSF4525 commented Mar 25, 2026

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!

This pull request updates the EntryControlPage and its code-behind to improve testability and maintainability of the Entry control's feature matrix. The main changes include adding new bindable properties, improving event handling, and simplifying the options navigation logic.

Enhancements to Entry control testability and UI:

  • Added bindings for WidthRequest, BackgroundColor, and Opacity to the Entry control in EntryControlPage.xaml to allow more comprehensive property testing.
  • Changed the AutomationId of the options button from "OptionsButton" to "Options" for consistency with test automation.
  • Added the TextChanged event handler (CursorPositionButton_Clicked) to the CursorPositionEntry control, enabling dynamic updates to cursor position via UI interaction.

Code simplification and maintainability:

  • Replaced manual property resets in NavigateToOptionsPage_Clicked with a call to the new _viewModel.Reset() method, making the reset logic more maintainable and centralized.
  • Minor cleanup in the code-behind by removing unnecessary whitespace.

Issue Identified:

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 25, 2026

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://github.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 34632

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://github.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 34632"

@dotnet-policy-service dotnet-policy-service Bot added the community ✨ Community Contribution label Mar 25, 2026
@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Hey there @@LogishaSelvarajSF4525! 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 Mar 25, 2026
@NafeelaNazhir NafeelaNazhir added area-testing Unit tests, device tests area-controls-entry Entry labels Mar 25, 2026
@sheiksyedm
Copy link
Copy Markdown
Contributor

/azp run maui-pr-uitests

@sheiksyedm sheiksyedm marked this pull request as ready for review March 26, 2026 10:54
Copilot AI review requested due to automatic review settings March 26, 2026 10:54
@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

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.

Pull request overview

This PR refactors the Entry Feature Matrix page and options UI to be more testable and easier to reset between scenarios, while updating platform snapshot baselines to reflect the UI/test behavior changes.

Changes:

  • Add new bindable properties to the Entry feature matrix (WidthRequest, BackgroundColor, Opacity) and centralize state reset via EntryViewModel.Reset().
  • Simplify the options UI event handling (e.g., using AutomationId to select colors; new handlers for width/opacity/height inputs; updated font attributes handling).
  • Update WinUI/macOS/iOS snapshot images to match the updated UI/test baselines.

Reviewed changes

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

Show a summary per file
File Description
src/Controls/tests/TestCases.HostApp/FeatureMatrix/EntryControl/EntryViewModel.cs Adds new properties (BackgroundColor/Opacity/WidthRequest) and a Reset() method to restore defaults for test runs.
src/Controls/tests/TestCases.HostApp/FeatureMatrix/EntryControl/EntryOptionsPage.xaml.cs Refactors option handlers (color selection by AutomationId, numeric input handlers, font-attributes checkbox aggregation).
src/Controls/tests/TestCases.HostApp/FeatureMatrix/EntryControl/EntryControlPage.xaml.cs Uses _viewModel.Reset() instead of re-instantiating the view model when navigating to options.
src/Controls/tests/TestCases.HostApp/FeatureMatrix/EntryControl/EntryControlPage.xaml Binds new properties to the Entry, updates Options AutomationId, and wires CursorPositionEntry TextChanged for better interactivity.
src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/VerifyClearButtonVisiblityWhenTextAlignedVertically.png Updated iOS snapshot baseline.
src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/VerifyClearButtonVisiblityWhenTextAlignedHorizontally.png Updated iOS snapshot baseline.
src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ClearButtonVisiblityButton_TextPresent.png Updated iOS snapshot baseline.
src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ClearButtonVisiblityButton_TextEmpty.png Updated iOS snapshot baseline.
src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/VerifyTextWhenAlingnedVertically.png Updated iOS 26 snapshot baseline.
src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/VerifyTextWhenAlingnedHorizontally.png Updated iOS 26 snapshot baseline.
src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/VerifyClearVisiblityButtonWhenTextColorChanged.png Updated iOS 26 snapshot baseline.
src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/VerifyClearButtonVisiblityWhenTextAlignedVertically.png Updated iOS 26 snapshot baseline.
src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/VerifyClearButtonVisiblityWhenTextAlignedHorizontally.png Updated iOS 26 snapshot baseline.
src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/ClearButtonVisiblityButton_TextPresent.png Updated iOS 26 snapshot baseline.
src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/ClearButtonVisiblityButton_TextEmpty.png Updated iOS 26 snapshot baseline.
src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/VerifyTextWhenAlignedVertically.png Updated WinUI snapshot baseline.
src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/VerifyTextWhenAlignedHorizontally.png Updated WinUI snapshot baseline.
src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/VerifyIsPasswordWhenMaxLengthSetValue.png Updated WinUI snapshot baseline.
src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/VerifyClearVisibilityButtonWhenTextColorChanged.png Updated WinUI snapshot baseline.
src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/VerifyClearButtonVisibilityWhenTextAlignedVertically.png Updated WinUI snapshot baseline.
src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/VerifyClearButtonVisibilityWhenTextAlignedHorizontally.png Updated WinUI snapshot baseline.
src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/VerifyClearButtonVisibilityWhenIsPasswordTrueOrFalse.png Updated WinUI snapshot baseline.
src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ClearButtonVisibilityButton_TextPresent.png Updated WinUI snapshot baseline.
src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ClearButtonVisibilityButton_TextEmpty.png Updated WinUI snapshot baseline.
src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/VerifyTextWhenAlignedVertically.png Updated macOS snapshot baseline.
src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/VerifyTextWhenAlignedHorizontally.png Updated macOS snapshot baseline.
src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/VerifyIsPasswordWhenMaxLengthSetValue.png Updated macOS snapshot baseline.
src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/VerifyClearVisibilityButtonWhenTextColorChanged.png Updated macOS snapshot baseline.
src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/VerifyClearButtonVisibilityWhenTextAlignedHorizontally.png Updated macOS snapshot baseline.
src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/VerifyClearButtonVisibilityWhenIsPasswordTrueOrFalse.png Updated macOS snapshot baseline.
src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/ClearButtonVisibilityButton_TextPresent.png Updated macOS snapshot baseline.
src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/ClearButtonVisibilityButton_TextEmpty.png Updated macOS snapshot baseline.

@MauiBot
Copy link
Copy Markdown
Collaborator

MauiBot commented Mar 27, 2026

🚦 Gate — Test Verification

📊 Expand Full Gate93f6a21 · updated the test cases

Gate Result: ❌ FAILED

Platform: ANDROID

Tests Detected

# Type Test Name Filter
1 UITest EntryFeatureTests EntryFeatureTests

Verification

Step Expected Actual Result
Without fix FAIL FAIL
With fix PASS FAIL

Details

  • Failed: VerifyTextWhenSelectionLengthSetValue [20 s]; VerifyTextWhenCursorPositionValueSet [21 s]; VerifyIsPasswordWhenCursorPositionValueSet [22 s]; VerifyCursorPositionWhenSelectionLengthSetValue [22 s]
  • 📋 Error: This test is currently failing on All platforms. See issue link: Inconsistent Behavior of IsSpellCheckEnabled and IsTextPredictionEnabled on Entry Control #29833
    Standard Output Messages:
    This test is currently failing on All platforms. See issue lin...; This test is currently failing on All platforms. See issue link: Inconsistent Behavior of IsSpellCheckEnabled and IsTextPredictionEnabled on Entry Control #29833
    Standard Output Messages:
    This test is currently failing on All platforms. See issue lin...; System.TimeoutException : Timed out waiting for element...; System.TimeoutException : Timed out waiting for element...; System.TimeoutException : Timed out waiting for element...; System.TimeoutException : Timed out waiting for element...

Fix Files Reverted

  • eng/pipelines/ci-copilot.yml

Base Branch: main | Merge Base: 720a9d4


@MauiBot MauiBot added s/agent-review-incomplete AI agent could not complete all phases (blocker, timeout, error) s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review) s/agent-changes-requested AI agent recommends changes - found a better alternative or issues s/agent-fix-win AI found a better alternative fix than the PR and removed s/agent-review-incomplete AI agent could not complete all phases (blocker, timeout, error) s/agent-changes-requested AI agent recommends changes - found a better alternative or issues labels Mar 27, 2026
@kubaflo
Copy link
Copy Markdown
Contributor

kubaflo commented Mar 28, 2026

/azp run maui-pr-uitests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Copy Markdown
Contributor

@kubaflo kubaflo left a comment

Choose a reason for hiding this comment

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

Some tests are failing

@sheiksyedm
Copy link
Copy Markdown
Contributor

/azp run maui-pr-uitests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Copy Markdown
Contributor

@kubaflo kubaflo left a comment

Choose a reason for hiding this comment

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

Some tests are failing - could you please verify?

@sheiksyedm
Copy link
Copy Markdown
Contributor

/azp run maui-pr-uitests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@kubaflo
Copy link
Copy Markdown
Contributor

kubaflo commented Apr 22, 2026

/azp run maui-pr-uitests

@azure-pipelines
Copy link
Copy Markdown

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-controls-entry Entry area-testing Unit tests, device tests community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration s/agent-changes-requested AI agent recommends changes - found a better alternative or issues s/agent-fix-win AI found a better alternative fix than the PR s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants