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 ported UITests from Xamarin.UITests to Appium - 16 #26029

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

anandhan-rajagopal
Copy link
Contributor

@anandhan-rajagopal anandhan-rajagopal commented Nov 21, 2024

Description of Change

This PR focuses on re-enabling and updating following tests from the Xamarin.UITest framework to be compatible with Appium. The tests, previously commented out, are reviewed, and modified to ensure they are functional with the Appium framework. We are going to enable tests in blocks in different PRs. This is the 16th group of tests enabled.

Add WaitForElementTillPageNavigationSettled Extension Method

Description

Also introduces a new extension method WaitForElementTillPageNavigationSettled to enhance the stability of UI tests, particularly for MacCatalyst applications. The method provides a more robust way to wait for elements during page transitions, helping to prevent null reference exceptions.

TestCases

  • Bugzilla38731
  • Bugzilla32040
  • Bugzilla39331
  • Bugzilla43527
  • Bugzilla40173
  • Bugzilla40005
  • Bugzilla10222
  • Bugzilla52419
  • Bugzilla45926

@rmarinho
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@mattleibow mattleibow added the area-testing Unit tests, device tests label Nov 21, 2024
@@ -1,4 +1,5 @@
using NUnit.Framework;
#if TEST_FAILS_ON_ANDROID && TEST_FAILS_ON_CATALYST && TEST_FAILS_ON_IOS && TEST_FAILS_ON_WINDOWS //Issue reproduced and logged: https://github.com/dotnet/maui/issues/26019.
Copy link
Contributor

Choose a reason for hiding this comment

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

The issue was a duplicated and has been closed, could you update the comment to replace it by #26026?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Replaced the issue link and committed the changes, kindly review and share your feedback.

src/TestUtils/src/UITest.Appium/HelperExtensions.cs Outdated Show resolved Hide resolved
App.WaitForElementTillPageNavigationSettled(PushNewPage);
App.Tap(PushNewPage);
App.WaitForElementTillPageNavigationSettled(TabPage2);
App.Tap(TabPage2);
Copy link
Contributor

Choose a reason for hiding this comment

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

Mnnn, maybe I could include a TapTab method that internally does the wait, and also in the case of Android the ToUpperCase.

@jsuarezruiz
Copy link
Contributor

@anandhan-rajagopal Could you rebase and fix the conflict? Thanks in advance.

@anandhan-rajagopal
Copy link
Contributor Author

@anandhan-rajagopal Could you rebase and fix the conflict? Thanks in advance.

Resolved the conflicts and rebased the branch.

@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).


[Test]
[Category(UITestCategories.Page)]
public void Issue45926Test()
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 Android:
image

// }
[Test]
[Category(UITestCategories.TabbedPage)]
public void Bugzilla52419Test()
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 Android:
image

@jsuarezruiz
Copy link
Contributor

@anandhan-rajagopal Could you rebase and fix the conflict? Thanks in advance.

@anandhan-rajagopal
Copy link
Contributor Author

@anandhan-rajagopal Could you rebase and fix the conflict? Thanks in advance.

Resolved conflicts

@rmarinho
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants