-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Testing] Enabling ported UITests from Xamarin.UITests to Appium - 5 (#…
…25772) * enabled few UI tests from XamarinUITests into Appium * Included the extension method for TapBackArrow * added ifdefines for failed case on windows and added image for failed case in mac * Update Issue889.cs
- Loading branch information
1 parent
1a88b34
commit b1f3340
Showing
7 changed files
with
78 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 22 additions & 16 deletions
38
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/XFIssue/Issue7311.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,40 @@ | ||
using NUnit.Framework; | ||
#if ANDROID | ||
using NUnit.Framework; | ||
using UITest.Appium; | ||
using UITest.Core; | ||
|
||
namespace Microsoft.Maui.TestCases.Tests.Issues; | ||
|
||
public class Issue7311 : _IssuesUITest | ||
{ | ||
const string FirstPickerItem = "Uno"; | ||
|
||
const string PickerId = "CaptainPickard"; | ||
|
||
public Issue7311(TestDevice testDevice) : base(testDevice) | ||
{ | ||
} | ||
|
||
public override string Issue => "[Bug] [Android] Error back hardware button with Picker"; | ||
|
||
//[Test] | ||
//[Category(UITestCategories.Picker)] | ||
//public void OpeningPickerPressingBackButtonTwiceShouldNotOpenPickerAgain() | ||
//{ | ||
// App.WaitForElement(PickerId); | ||
// App.Tap(PickerId); | ||
|
||
// App.WaitForElement(FirstPickerItem); | ||
[Test] | ||
[Category(UITestCategories.Picker)] | ||
public void OpeningPickerPressingBackButtonTwiceShouldNotOpenPickerAgain() | ||
{ | ||
App.WaitForElement(PickerId); | ||
App.Tap(PickerId); | ||
|
||
// App.Back(); | ||
App.WaitForElement(FirstPickerItem); | ||
|
||
// App.WaitForNoElement(FirstPickerItem); | ||
App.Back(); | ||
|
||
// App.Back(); | ||
App.WaitForNoElement(FirstPickerItem); | ||
|
||
// App.WaitForNoElement(FirstPickerItem, "Picker is again visible after second back button press", TimeSpan.FromSeconds(10)); | ||
//The Below actions are not possible due to the current implementation of the Host app, the issue page has designated the MainPage of the Current Application. | ||
//App.Back(); | ||
//App.WaitForNoElement(FirstPickerItem, "Picker is again visible after second back button press", TimeSpan.FromSeconds(10)); | ||
|
||
// App.Screenshot("Back at the previous page, not showing the picker again"); | ||
//} | ||
} | ||
App.Screenshot("Back at the previous page, not showing the picker again"); | ||
} | ||
} | ||
#endif |
39 changes: 24 additions & 15 deletions
39
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/XFIssue/Issue889.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,38 @@ | ||
using NUnit.Framework; | ||
using NUnit.Framework; | ||
using UITest.Appium; | ||
using UITest.Core; | ||
|
||
namespace Microsoft.Maui.TestCases.Tests.Issues; | ||
|
||
public class Issue889 : _IssuesUITest | ||
{ | ||
|
||
#if ANDROID | ||
const string Tab2Title = "TAB 2 TITLE"; | ||
#else | ||
const string Tab2Title = "Tab 2 Title"; | ||
#endif | ||
public Issue889(TestDevice testDevice) : base(testDevice) | ||
{ | ||
} | ||
|
||
public override string Issue => "Assigning to FlyoutPage.Detail after construction doesn't work"; | ||
|
||
//[Test] | ||
//[Category(UITestCategories.FlyoutPage)] | ||
//[Description("Reproduce app crash - Issue #983")] | ||
//public void Issue899TestsAppCrashWhenSwitchingTabs() | ||
//{ | ||
// App.Tap(q => q.Marked("Push new page")); | ||
// App.WaitForElement(q => q.Marked("I have been pushed")); | ||
// App.Screenshot("Push page"); | ||
// App.Back(); | ||
// App.Screenshot("Navigate back"); | ||
[Test] | ||
[Category(UITestCategories.FlyoutPage)] | ||
public void Issue899TestsAppCrashWhenSwitchingTabs() | ||
{ | ||
App.WaitForElement("PushPage"); | ||
App.Tap("PushPage"); | ||
App.WaitForElement("PushedPageLabel"); | ||
|
||
#if IOS || MACCATALYST | ||
App.Tap(AppiumQuery.ByName("Initial Page")); | ||
#else | ||
App.TapBackArrow(); | ||
#endif | ||
|
||
// App.Tap(q => q.Marked("Tab 2 Title")); | ||
// App.Screenshot("Go to second tab"); | ||
//} | ||
} | ||
App.Tap(Tab2Title); | ||
App.WaitForElement("SecondTabPageButton"); | ||
} | ||
} |