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] Enabling more UI Tests by removing platform specific condition - 3 #27501

Merged
merged 16 commits into from
Feb 13, 2025

Conversation

LogishaSelvarajSF4525
Copy link
Contributor

Description of Change

The tests, previously added for specific platforms alone, now we are reviewed, and enabled the tests in all applicable platforms with the Appium framework. We are going to enable tests in blocks in different PRs. This is the 3rd group of tests enabled.

Test Cases:

  • Issue21173
  • Issue21202
  • Issue21314
  • Issue21394
  • Issue21437
  • Issue21706
  • Issue21787
  • Issue22042
  • Issue22183
  • Issue2241
  • Issue22606
  • Issue22630
  • Issue22750
  • Issue22937
  • Issue4484

Fixes #22902

@LogishaSelvarajSF4525 LogishaSelvarajSF4525 added area-testing Unit tests, device tests partner/syncfusion Issues / PR's with Syncfusion collaboration labels Jan 31, 2025
@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Jan 31, 2025
@LogishaSelvarajSF4525 LogishaSelvarajSF4525 marked this pull request as ready for review February 3, 2025 06:04
@Copilot Copilot bot review requested due to automatic review settings February 3, 2025 06:04
@LogishaSelvarajSF4525 LogishaSelvarajSF4525 requested a review from a team as a code owner February 3, 2025 06:04

Choose a reason for hiding this comment

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

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

Files not reviewed (11)
  • src/Controls/tests/TestCases.HostApp/Issues/Issue22630.xaml: Language not supported
  • src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue21173.cs: Evaluated as low risk
  • src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue22042.cs: Evaluated as low risk
  • src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue21394.cs: Evaluated as low risk
  • src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue21202.cs: Evaluated as low risk
  • src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue21314.cs: Evaluated as low risk
  • src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue22183.cs: Evaluated as low risk
  • src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue22937.cs: Evaluated as low risk
  • src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue22750.cs: Evaluated as low risk
  • src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue21787.cs: Evaluated as low risk
  • src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue21706.cs: Evaluated as low risk
Comments suppressed due to low confidence (1)

src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue2241.cs:1

  • [nitpick] The comment could be clearer: 'The test fails on Windows and MacCatalyst because the SetOrientation method is only supported on mobile platforms (iOS and Android).'
#if IOS || 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 iOS and Android.
@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@@ -12,7 +12,6 @@ public Issue21173(TestDevice device)
: base(device)
{ }

#if ANDROID
[Test]
[Category(UITestCategories.Border)]
public void BorderWithRoundRectangleShouldRoundCornersOfContentWithinIt()
Copy link
Contributor

Choose a reason for hiding this comment

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

This test is failing on Windows:

   at UITest.Appium.HelperExtensions.Wait(Func`1 query, Func`2 satisfactory, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2311
   at UITest.Appium.HelperExtensions.WaitForAtLeastOne(Func`1 query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2326
   at UITest.Appium.HelperExtensions.WaitForElement(IApp app, String marked, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 postTimeout) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 663
   at Microsoft.Maui.TestCases.Tests.Issues.Issue21173.BorderWithRoundRectangleShouldRoundCornersOfContentWithinIt() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue21173.cs:line 19
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Modified the test to ensure it runs on Windows and committed the code changes.

Copy link
Contributor

Choose a reason for hiding this comment

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

Nice! The snapshot on Windows is pending and available on the latest build.

@@ -1,5 +1,4 @@
#if IOS
using NUnit.Framework;
using NUnit.Framework;
Copy link
Contributor

Choose a reason for hiding this comment

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

Pending snapshots. Already available on the latest build.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have committed this snapshot in the latest changes.

@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@@ -28,5 +27,4 @@ public void RadioButtonUpdateValueInsideBorder()
VerifyScreenshot("RadioButtonUpdateValueInsideBorderYes");
Copy link
Contributor

Choose a reason for hiding this comment

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

Pending snapshot on macOS.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The images generated for Mac from this CI have not proper, Could we attempt to retrigger the CI for this?

Copy link
Contributor

Choose a reason for hiding this comment

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

Build failing because the test is pending:
image
Attached it.

@@ -12,7 +12,6 @@ public Issue21173(TestDevice device)
: base(device)
{ }

#if ANDROID
[Test]
[Category(UITestCategories.Border)]
public void BorderWithRoundRectangleShouldRoundCornersOfContentWithinIt()
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice! The snapshot on Windows is pending and available on the latest build.

@@ -23,5 +22,4 @@ public void ToolbarItemFontColorDynamicUpdate()
VerifyScreenshot();
Copy link
Contributor

Choose a reason for hiding this comment

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

Pending snapshot on Mac.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The images generated for Mac from this CI have not proper, Could we attempt to retrigger the CI for this?

Copy link
Contributor

Choose a reason for hiding this comment

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

Better wait to #27531

@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

Copy link
Contributor

@jsuarezruiz jsuarezruiz left a comment

Choose a reason for hiding this comment

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

We've changed the logic for taking screenshots on macOS. It has been optimized, now instead of setting the App to full screen and taking the screenshot, we directly get the Window position and size and create a snapshot by cropping the App's content from the screen.

This requires re-committing the updated macOS screenshots.

Example:

Issue21394Test
image

@LogishaSelvarajSF4525
Copy link
Contributor Author

We've changed the logic for taking screenshots on macOS. It has been optimized, now instead of setting the App to full screen and taking the screenshot, we directly get the Window position and size and create a snapshot by cropping the App's content from the screen.

This requires re-committing the updated macOS screenshots.

Example:

Issue21394Test image

I have updated the current Mac snapshots to reflect the latest changes.

@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@@ -28,5 +27,4 @@ public void RadioButtonUpdateValueInsideBorder()
VerifyScreenshot("RadioButtonUpdateValueInsideBorderYes");
Copy link
Contributor

Choose a reason for hiding this comment

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

Build failing because the test is pending:
image
Attached it.

@LogishaSelvarajSF4525
Copy link
Contributor Author

@jsuarezruiz I have updated the current Mac snapshots to reflect the latest changes.

@mattleibow
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@jfversluis jfversluis merged commit dc4af6c into dotnet:main Feb 13, 2025
123 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.

[TEST] Review all (UI) Tests and remove platform-specific runs where possible
4 participants