Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

jsuarezruiz
Copy link
Contributor

@jsuarezruiz jsuarezruiz commented Jun 2, 2025

Description of Change

Fix TapCoordinates method in Catalyst. No longer requires to use compilation directives in tests, , improving clarity and maintainability.

Fixes #19754

@Copilot Copilot AI review requested due to automatic review settings June 2, 2025 11:40
@jsuarezruiz jsuarezruiz requested a review from a team as a code owner June 2, 2025 11:40
@jsuarezruiz jsuarezruiz added the area-testing Unit tests, device tests label Jun 2, 2025
@jsuarezruiz jsuarezruiz requested a review from tj-devel709 June 2, 2025 11:40
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.

Pull Request Overview

This PR fixes the TapCoordinates and DoubleTapCoordinates methods to correctly handle Catalyst by directly invoking the existing coordinate-based click/double-click operations for AppiumCatalystApp, and removes obsolete compilation directives from shared test cases to improve clarity.

  • Add conditional branches in TapCoordinates and DoubleTapCoordinates to support Catalyst without compiler flags.
  • Remove #if MACCATALYST directives in shared UI tests, using TapCoordinates consistently.
  • Clean up outdated XML doc comments referencing Catalyst issues.

Reviewed Changes

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

File Description
HelperExtensions.cs Added if (app is AppiumCatalystApp) branches for coordinate taps/double taps; removed outdated summary lines
Issue2894.cs Removed Catalyst-specific compilation guard in PerformGestureAction, always using TapCoordinates
Issue12685.cs Simplified test to use TapCoordinates for all platforms; minor comment cleanup
Comments suppressed due to low confidence (3)

src/TestUtils/src/UITest.Appium/HelperExtensions.cs:405

  • The XML doc for DoubleTapCoordinates and TapCoordinates should be updated to mention Catalyst support, reflecting that these methods now work on AppiumCatalystApp without compiler directives.
public static void DoubleTapCoordinates(this IApp app, float x, float y)

src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/XFIssue/Issue2894.cs:47

  • Consider adding or updating a UI test in the HostApp to explicitly verify that TapCoordinates works on Mac Catalyst to ensure this fix is covered end-to-end.
App.TapCoordinates(x, y);

src/TestUtils/src/UITest.Appium/HelperExtensions.cs:408

  • The call to app.DoubleClickCoordinates references a method that doesn’t exist in this class. Consider renaming it to app.DoubleTapCoordinates or implementing the DoubleClickCoordinates extension.
app.DoubleClickCoordinates(x, y); // Directly invoke coordinate-based double click for AppiumCatalystApp.

@MartyIX
Copy link
Contributor

MartyIX commented Jun 4, 2025

Should the OP contain Fixes #19754? That is, does this PR fix #19754?

@jsuarezruiz
Copy link
Contributor Author

Should the OP contain Fixes #19754? That is, does this PR fix #19754?

Right, updated the PR description.

@rmarinho
Copy link
Member

rmarinho commented Jun 4, 2025

/rebase

@github-actions github-actions bot force-pushed the fix-uitest-tapcoordinates-mac branch from 4241171 to 60ba128 Compare June 4, 2025 10:23
@rmarinho rmarinho added this to the .NET 9 SR8 milestone Jun 5, 2025
@rmarinho rmarinho moved this from Todo to Approved in MAUI SDK Ongoing Jun 5, 2025
@PureWeen PureWeen changed the base branch from main to inflight/current June 6, 2025 15:31
@PureWeen PureWeen merged commit 8c41f90 into inflight/current Jun 6, 2025
129 checks passed
@PureWeen PureWeen deleted the fix-uitest-tapcoordinates-mac branch June 6, 2025 15:31
@github-project-automation github-project-automation bot moved this from Approved to Done in MAUI SDK Ongoing Jun 6, 2025
github-actions bot pushed a commit that referenced this pull request Jun 7, 2025
PureWeen added a commit that referenced this pull request Jun 21, 2025
For more information about inflight process check
https://github.com/dotnet/maui/wiki/Inflight-Branch-Process

# .NET MAUI Release Notes - inflight/candidate Branch

## MAUI Product Fixes
* [iOS] Fix SwipeView programmatic open when background color is set by
@Shalini-Ashokan in #29765
* [iOS] FormattedText with text color causes stack overflow - fix by
@kubaflo in #29874
* [iOS] Fix AdaptiveTrigger not working as expected by @jsuarezruiz in
#20987
* [iOS] Fix for Flyout title is not broken over multiple lines when you
rotate your screen by @BagavathiPerumal in
#29171
* [Windows] Fix for Assigning null to the SelectedItem of the
CollectionView in the SelectionChanged event does not clear the
selection by @SyedAbdulAzeemSF4852 in
#29288
* Fix TapCoordinates method in Catalyst by @jsuarezruiz in
#29775
* Fixed ItemSpacing on CarouselView resizes items [Android] by
@Dhivya-SF4094 in #29796
* Perf : ButtonContentTypeConverter now using InvariantCulture to parse
double by @antoine-jonathan in #25393
* ToolbarItem behavior with ImageSource iOS - fix by @kubaflo in
#28833
* [Android] Fixed Button Shadow Color Transparency Not Applied Correctly
by @NanthiniMahalingam in #29371
* Don't call NSAttributedString with HTML from a background thread by
@kubaflo in #26153
* [Windows] Implemented the Resize and Downsize functions in the
W2DImage class by @HarishwaranVijayakumar in
#29138
* Templated indicator view - improvements by @kubaflo in
#25642
* Update Issue25946.xaml by @anandhan-rajagopal in
#30025

## Testing
* Fixed Test case failure in PR 26153 - iOS by @kubaflo in
#29906
* Fixed Test case failure in PR 25642 - snapshots by @kubaflo in
#29881
* [Testing] Feature Matrix UITest Cases for RadioButton by
@TamilarasanSF4853 in #29744
* [Testing] Feature Matrix UITest Cases for CollectionView ItemsSource
Feature by @LogishaSelvarajSF4525 in
#29322
* [Testing] Feature Matrix UITest Cases for Stepper by
@nivetha-nagalingam in #29731
* [Testing] Feature Matrix UITest Cases for CheckBox Control by
@anandhan-rajagopal in #29739
* Update the comment for the test properties by @mattleibow in
#27306

## Dependency Updates
* No changes in this category

## Docs
* No changes in this category

## Housekeeping
* [create-pull-request] automated change by @github-actions[bot] in
#29875
* [create-pull-request] automated change by @github-actions[bot] in
#29792
* [create-pull-request] automated change by @github-actions[bot] in
#29760

**Full Changelog**:
origin/main...origin/inflight/candidate
@PureWeen PureWeen modified the milestones: .NET 9 SR8, .NET 9 SR9 Jun 23, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Jul 24, 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
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[UITest] Investigate adding coordinate clicking to the Tap feature for catalyst
4 participants