Skip to content
Merged
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 @@ -16,42 +16,31 @@ public CollectionViewItemsUpdatingScrollModeUITests(TestDevice device)
protected override bool ResetAfterEachTest => true;

#if TEST_FAILS_ON_WINDOWS // For more information, see :https://github.com/dotnet/maui/issues/28006
#if ANDROID
[Test]
[ShardedTestCategory(UITestCategories.CollectionView, shard: 5)]
public void KeepItemsInView()
{
App.WaitForElement("ScrollToMiddle");
App.Click("ScrollToMiddle");
App.WaitForElement("Vegetables.jpg, 10");
Assert.That(App.WaitForElement("Vegetables.jpg, 10").IsDisplayed(), Is.True);

for (int n = 0; n < 25; n++)
{
App.WaitForElement("AddItemAbove");
App.Tap("AddItemAbove");
}
App.WaitForElement("AddItemAbove");
App.Tap("AddItemAbove");
Assert.That(App.WaitForElement("cover1.jpg, 0").IsDisplayed(), Is.True);

App.WaitForNoElement("Vegetables.jpg, 10");
}

#else
[Test]
[ShardedTestCategory(UITestCategories.CollectionView, shard: 5)]
public void KeepItemsInView()
{
App.WaitForElement("ScrollToMiddle");
// AddItemAbove inserts before the midpoint, so item 9 is now at index 10.
App.Click("ScrollToMiddle");
App.WaitForElement("Vegetables.jpg, 10");
Assert.That(App.WaitForElement("photo.jpg, 9").IsDisplayed(), Is.True);

for (int n = 0; n < 25; n++)
for (int n = 0; n < 24; n++)
{
App.Click("AddItemAbove");
App.WaitForElement("AddItemAbove");
App.Tap("AddItemAbove");
}

App.WaitForElement("Vegetables.jpg, 10");
Assert.That(App.WaitForElement("cover1.jpg, 0").IsDisplayed(), Is.True);
}
#endif
#endif

#if TEST_FAILS_ON_IOS && TEST_FAILS_ON_CATALYST // The test fails on iOS and macOS because Appium is unable to locate the Picker control elements resulting in a TimeoutException. For more information, see: https://github.com/dotnet/maui/issues/28024
// KeepScrollOffset (src\Compatibility\ControlGallery\src\Issues.Shared\CollectionViewItemsUpdatingScrollMode.cs)
Expand Down
Loading