Skip to content

Commit

Permalink
[Testing] Enabling some UITests from Issues folder in Appium-8 (#27182)
Browse files Browse the repository at this point in the history
* removed FailsOn attributes from issues

* migrate the issues

* remove FailOn attributes

* revert changes

* update the commands

* remove the FailsOn attributes

* revert change

* added a snapshots for issues

* added snapshots

* added snapshot for issues

* added snapshot for Issue22433
  • Loading branch information
LogishaSelvarajSF4525 authored Jan 20, 2025
1 parent a46b6f7 commit 1807a6c
Show file tree
Hide file tree
Showing 30 changed files with 32 additions and 59 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public Issue19509(TestDevice device) : base(device)
public override string Issue => "Entry TextColor property not working when the Text value is bound after some time";

[Test]
[FailsOnMacWhenRunningOnXamarinUITest("VerifyScreenshot method not implemented on macOS")]
[Category(UITestCategories.Entry)]
public async Task EntryTextColorStopsWorkingAfterPropertyIsUpdatedFromBinding()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ public Issue20156(TestDevice device)

[Test]
[Category(UITestCategories.Border)]
[FailsOnMacWhenRunningOnXamarinUITest("VerifyScreenshot method not implemented on macOS")]
public void BorderShouldHaveNoThickness()
{
_ = App.WaitForElement("WaitForStubControl");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if TEST_FAILS_ON_CATALYST
using NUnit.Framework;
using NUnit.Framework;
using UITest.Appium;
using UITest.Core;

Expand Down Expand Up @@ -36,4 +35,3 @@ public async Task ButtonLayoutAndSpacingTests()
}
}
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ public Issue23158(TestDevice device) : base(device)
{
}

#if !MACCATALYST
[Test]
[Category(UITestCategories.Entry)]
public void ValidateEntryClearButtonVisibilityBehavior()
Expand All @@ -33,5 +32,4 @@ public void ValidateEntryClearButtonVisibilityBehavior()

VerifyScreenshot();
}
#endif
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public Issue24574(TestDevice testDevice) : base(testDevice)
public override string Issue => "Tap Double Tap";

[Test]
[FailsOnMacWhenRunningOnXamarinUITest]
[Category(UITestCategories.Gestures)]
[Category(UITestCategories.Compatibility)]
public void TapThenDoubleTap()
Expand All @@ -23,10 +22,10 @@ public void TapThenDoubleTap()
App.WaitForElement("TapLabel");

App.Tap("TapLabel");
App.WaitForNoElement("Single");
App.WaitForElement("Single");

App.DoubleTap("TapLabel");
App.WaitForNoElement("Double");
App.WaitForElement("Double");
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if TEST_FAILS_ON_CATALYST
using NUnit.Framework;
using NUnit.Framework;
using UITest.Appium;
using UITest.Core;

Expand All @@ -21,5 +20,4 @@ public void TextInEditorShouldBeCorrectlyPositionedAfterResizing()
App.Click("button");
VerifyScreenshot("TextsInEditorsAfterScaling");
}
}
#endif
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#if IOS
# if TEST_FAILS_ON_CATALYST && TEST_FAILS_ON_IOS
// The DisplayActionSheet will not dismiss when tapping outside of it, which is a behavior specific to iPads on iOS. Since the host app is running on an iPhone XS, this test can be ignored.
using NUnit.Framework;
using UITest.Appium;
using UITest.Core;
Expand All @@ -9,9 +10,7 @@ public class Issue3049 : _IssuesUITest
{
const string Button1Id = "button1";
const string Button2Id = "button2";
const string LabelId = "label";
const string Success = "Success";
const string Action1 = "Don't click me";

public Issue3049(TestDevice testDevice) : base(testDevice)
{
Expand All @@ -22,18 +21,17 @@ public Issue3049(TestDevice testDevice) : base(testDevice)
[Test]
[Category(UITestCategories.DisplayAlert)]
[Category(UITestCategories.Compatibility)]
[FailsOnIOSWhenRunningOnXamarinUITest]
[FailsOnIOSWhenRunningOnXamarinUITest("Skip this test -- as it is not applicable since the host app is not run on iPad in CI")]
public async Task Issue3049Test()
{
App.WaitForElement(Button1Id);

App.Tap(Button1Id);

await Task.Delay(500);
//App.WaitForElement(Action1);

// Tap outside ActionSheet to dismiss it
App.Tap(LabelId);
App.TapCoordinates(50, 100);

App.WaitForElement(Button2Id);
App.Tap(Button2Id);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if ANDROID
using NUnit.Framework;
using NUnit.Framework;
using UITest.Appium;
using UITest.Core;

Expand All @@ -18,8 +17,7 @@ public Issue3087(TestDevice testDevice) : base(testDevice)
[Category(UITestCategories.Compatibility)]
public void NonAppCompatBasicSwitchTest()
{
App.WaitForNoElement("Success");
App.WaitForElement("Success");
}
}
}
#endif
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if IOS
using NUnit.Framework;
using NUnit.Framework;
using UITest.Appium;
using UITest.Core;

Expand All @@ -16,7 +15,6 @@ public Issue3385(TestDevice testDevice) : base(testDevice)
[Test]
[Category(UITestCategories.Entry)]
[Category(UITestCategories.Compatibility)]
[FailsOnIOSWhenRunningOnXamarinUITest]
public void Issue3385Test()
{
App.WaitForElement("entry");
Expand All @@ -26,5 +24,4 @@ public void Issue3385Test()
App.WaitForNoElement("FAIL");
}
}
}
#endif
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if WINDOWS
using NUnit.Framework;
using NUnit.Framework;
using UITest.Appium;
using UITest.Core;

Expand All @@ -20,9 +19,8 @@ public Issue3507(TestDevice testDevice) : base(testDevice)
[Category(UITestCategories.Compatibility)]
public void NullContentOnScrollViewDoesntCrash()
{
App.WaitForNoElement(Success);
App.WaitForElement(Success);
//if it doesn't crash, we're good.
}
}
}
#endif
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,10 @@ public Issue3884(TestDevice testDevice) : base(testDevice)
[Test]
[Category(UITestCategories.BoxView)]
[Category(UITestCategories.Compatibility)]
[FailsOnIOSWhenRunningOnXamarinUITest]
[FailsOnMacWhenRunningOnXamarinUITest]
[FailsOnWindowsWhenRunningOnXamarinUITest]
public void Issue3884Test()
{
App.WaitForElement("TestReady");
App.Screenshot("I see a blue circle");
App.WaitForElement("You should see a blue circle");
VerifyScreenshot();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@ public Issue5239(TestDevice testDevice) : base(testDevice)
[Test]
[Category(UITestCategories.Layout)]
[Category(UITestCategories.Compatibility)]
[FailsOnIOSWhenRunningOnXamarinUITest]
public void PaddingEqualToSafeAreaWorks()
{
var somePadding = App.WaitForElement("Hello").GetRect();
ClassicAssert.AreEqual(20f, somePadding.Y);
Assert.That(20f, Is.EqualTo(somePadding.Y));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,9 @@ public Issue5376(TestDevice testDevice) : base(testDevice)
[Test]
[Category(UITestCategories.Entry)]
[Category(UITestCategories.Compatibility)]
[FailsOnIOSWhenRunningOnXamarinUITest]
[FailsOnMacWhenRunningOnXamarinUITest]
[FailsOnWindowsWhenRunningOnXamarinUITest]
public void Issue5376Test()
{
App.WaitForNoElement("Success");
App.WaitForElement("Success");
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if ANDROID
using NUnit.Framework;
using NUnit.Framework;
using UITest.Appium;
using UITest.Core;

Expand All @@ -20,8 +19,7 @@ public Issue5461(TestDevice testDevice) : base(testDevice)
[Category(UITestCategories.Compatibility)]
public void ScrollViewWithScrollbarFadingEnabledFalseDoesntCrash()
{
App.WaitForNoElement(Success);
App.WaitForElement(Success);
}
}
}
#endif
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ public Issue5555(TestDevice device) : base(device)

[Test]
[Category(UITestCategories.TableView)]
[FailsOnIOSWhenRunningOnXamarinUITest("This test is failing, likely due to product issue")]
[FailsOnMacWhenRunningOnXamarinUITest("This test is failing, likely due to product issue")]
public void TableViewMemoryLeakWhenUsingSwitchCellOrEntryCell()
{
App.WaitForElement("PushPage");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if IOS
#if TEST_FAILS_ON_WINDOWS //application crash while load the listview, for more information: https://github.com/dotnet/maui/issues/27174
using NUnit.Framework;
using UITest.Appium;
using UITest.Core;
Expand All @@ -21,19 +21,22 @@ public Issue6472(TestDevice testDevice) : base(testDevice)
[Test]
[Category(UITestCategories.ListView)]
[Category(UITestCategories.Compatibility)]
[Ignore("Fails occasionally on iOS 12 https://github.com/xamarin/Xamarin.Forms/issues/6472")]
public void ListViewDoesNotThrowExceptionWithObservableCollection()
{
App.WaitForElement(ListViewAutomationId);
App.Screenshot("We got here without an exception while loading the data and data is visible");

App.Tap(ClearButtonAutomationId);
App.Tap(UiThreadButtonAutomationId);
App.WaitForElement("Just three");
App.Tap(OtherThreadButtonAutomationId);

App.WaitForElement("THE answer");
App.Tap(ClearButtonAutomationId);
App.WaitForNoElement("Just three");
App.WaitForNoElement("THE answer");
App.Tap(OtherThreadButtonAutomationId);
App.WaitForElement("THE answer");
App.Tap(UiThreadButtonAutomationId);
App.WaitForElement("Just three");

}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ public Issue7823(TestDevice device)

[Test]
[Category(UITestCategories.ToolbarItem)]
[FailsOnMacWhenRunningOnXamarinUITest("VerifyScreenshot method not implemented on macOS")]
public void UpdateToolbarItemAfterNavigate()
{
// 1. Navigate from Page with a ToolbarItem using an Icon.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1807a6c

Please # to comment.