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 - 45 #26564

Merged
merged 1 commit into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ protected override void Init()
},

GroupDisplayBinding = new Binding("LongTitle"),
GroupShortNameBinding = new Binding("Title"),
// While using this GroupShortNameBinding property it throws an exception on Windows for more information:/~https://github.com/dotnet/maui/issues/26534. For this test case we don't need this property.
// GroupShortNameBinding = new Binding("Title"),
Header = "HEADER",
Footer = "FOOTER",
IsGroupingEnabled = true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@
Grid.Row="1"
AutomationId="ResultId"
x:Name="ItemsCount"/>

<!-- Getting exception while running the sample with GroupShortNameBinding on windows, Issue: /~https://github.com/dotnet/maui/issues/26534.-->
<ListView
Grid.Row="2"
AutomationId="ListViewId"
x:Name="Issue11381ListView"
GroupDisplayBinding="{Binding LongName}"
GroupShortNameBinding="{Binding ShortName}"
HasUnevenRows="True"
IsGroupingEnabled="true">
<ListView.ItemTemplate>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using NUnit.Framework;
#if TEST_FAILS_ON_IOS && TEST_FAILS_ON_CATALYST //ListView IsEnabled property is not working on iOS and Catalyst, Issue: /~https://github.com/dotnet/maui/issues/19768.
using NUnit.Framework;
using UITest.Appium;
using UITest.Core;

Expand All @@ -10,18 +11,18 @@ public Bugzilla34912(TestDevice testDevice) : base(testDevice)
{
}

public override string Issue => "Can't change IsPresented when setting SplitOnLandscape ";
public override string Issue => "ListView.IsEnabled has no effect on iOS";

// [Test]
// [Category(UITestCategories.ListView)]
// [FailsOnIOSWhenRunningOnXamarinUITest]
// public void Bugzilla34912Test()
// {
// App.Tap("Allen");
// App.WaitForElement("You tapped Allen");
// App.Tap("OK");
// App.Tap("btnDisable");
// App.Tap("Allen");
// App.WaitForNoElement("You tapped Allen");
// }
}
[Test]
[Category(UITestCategories.ListView)]
public void Bugzilla34912Test()
{
App.Tap("Allen");
App.WaitForElement("You tapped Allen");
App.Tap("OK");
App.Tap("Disable ListView");
App.Tap("Allen");
App.WaitForNoElement("You tapped Allen");
}
}
#endif
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using NUnit.Framework;
#if TEST_FAILS_ON_IOS // On iOS the app get freez and getting an exception 'System.IO.FileNotFoundException' in System.Private.CoreLib.dll while using the images from url in HostApp. But in simple sample it works fine.
using NUnit.Framework;
using UITest.Appium;
using UITest.Core;

Expand All @@ -12,21 +13,19 @@ public Issue11381(TestDevice testDevice) : base(testDevice)

public override string Issue => "[Bug] [iOS] NRE on grouped ListView when removing cells with gesture recognizers";

//[Test]
//[Category(UITestCategories.ListView)]
//[FailsOnMauiIOS]
//public void Issue11381RemoveListViewGroups()
//{
// App.WaitForElement("ListViewId", "Timed out waiting for the ListView.");

// App.Tap(x => x.Marked("G1I1"));
// App.Tap(x => x.Marked("G1I2"));
// App.Tap(x => x.Marked("G1I3"));
// App.Tap(x => x.Marked("G1I4"));
// App.Tap(x => x.Marked("G2I1"));
// App.Tap(x => x.Marked("G2I2"));

// App.WaitForElement("ResultId");
// Assert.AreEqual("0 groups", App.WaitForElement("ResultId")[0].ReadText());
//}
}
[Test]
[Category(UITestCategories.ListView)]
public void Issue11381RemoveListViewGroups()
{
App.WaitForElement("ListViewId", "Timed out waiting for the ListView.");
App.Tap("G2I2");
App.Tap("G2I1");
App.Tap("G1I4");
App.Tap("G1I3");
App.Tap("G1I2");
App.Tap("G1I1");
App.WaitForElement("ResultId");
Assert.That("0 groups",Is.EqualTo( App.WaitForElement("ResultId").ReadText()));
}
}
#endif
Loading