Skip to content

Commit

Permalink
Enable now passing tests and add some TableView categories (#20531)
Browse files Browse the repository at this point in the history
* Enable now passing tests and add some TableView categories

* Update Bugzilla51503.cs

* Update Issue7700.cs

* Update Issue773.cs

* - ignore a few that are still flakey
  • Loading branch information
PureWeen committed Mar 5, 2024
1 parent 9bb4cd1 commit 7d53718
Show file tree
Hide file tree
Showing 56 changed files with 67 additions and 36 deletions.
Expand Up @@ -254,7 +254,6 @@ protected override void OnPagesChanged(NotifyCollectionChangedEventArgs e)
}

#if UITEST && __ANDROID__
[Microsoft.Maui.Controls.Compatibility.UITests.FailsOnMauiAndroid]
[Test]
public async Task AddAndRemovePages()
{
Expand Down
Expand Up @@ -11,6 +11,7 @@ namespace Microsoft.Maui.Controls.ControlGallery.Issues
{
#if UITEST
[Category(Compatibility.UITests.UITestCategories.Bugzilla)]
[Category(Compatibility.UITests.UITestCategories.TableView)]
#endif
[Issue(IssueTracker.Bugzilla, 27085, "EntryCell has no possibility to hide keyboard on iOS")]
public class Bugzilla27085 : TestContentPage // or TestFlyoutPage, etc ...
Expand Down
Expand Up @@ -66,7 +66,6 @@ protected override void Init()
}

#if UITEST
[Microsoft.Maui.Controls.Compatibility.UITests.FailsOnMauiAndroid]
[Microsoft.Maui.Controls.Compatibility.UITests.FailsOnMauiIOS]
[Test]
public void Bugzilla29453Test()
Expand Down
Expand Up @@ -15,6 +15,7 @@ namespace Microsoft.Maui.Controls.ControlGallery.Issues
{
#if UITEST
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.Bugzilla)]
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.TableView)]
#endif
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Bugzilla, 31333,
Expand Down
Expand Up @@ -14,6 +14,7 @@ namespace Microsoft.Maui.Controls.ControlGallery.Issues
[Category(UITestCategories.Bugzilla)]
[Category(UITestCategories.Cells)]
[Category(UITestCategories.UwpIgnore)]
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.TableView)]
#endif

[Preserve(AllMembers = true)]
Expand Down
Expand Up @@ -8,6 +8,7 @@ namespace Microsoft.Maui.Controls.ControlGallery.Issues
{
#if UITEST
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.Bugzilla)]
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.TableView)]
#endif
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Bugzilla, 32847,
Expand Down
Expand Up @@ -13,6 +13,7 @@ namespace Microsoft.Maui.Controls.ControlGallery.Issues
{
#if UITEST
[Category(Compatibility.UITests.UITestCategories.Bugzilla)]
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.TableView)]
#endif
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Bugzilla, 33578, "TableView EntryCell shows DefaultKeyboard, but after scrolling down and back a NumericKeyboard (")]
Expand Down
Expand Up @@ -12,6 +12,7 @@ namespace Microsoft.Maui.Controls.ControlGallery.Issues
{
#if UITEST
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.Bugzilla)]
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.TableView)]
#endif
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Bugzilla, 36559, "[WP] Navigating to a ContentPage with a Grid inside a TableView affects Entry heights")]
Expand Down
Expand Up @@ -14,6 +14,7 @@ namespace Microsoft.Maui.Controls.ControlGallery.Issues
{
#if UITEST
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.Bugzilla)]
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.TableView)]
#endif
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Bugzilla, 36955, "[iOS] ViewCellRenderer.UpdateIsEnabled referencing null object", PlatformAffected.iOS)]
Expand Down
Expand Up @@ -14,6 +14,7 @@ namespace Microsoft.Maui.Controls.ControlGallery.Issues
{
#if UITEST
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.Bugzilla)]
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.TableView)]
#endif
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Bugzilla, 37841, "TableView EntryCells and TextCells cease to update after focus change", PlatformAffected.Android)]
Expand Down
Expand Up @@ -11,6 +11,7 @@ namespace Microsoft.Maui.Controls.ControlGallery.Issues
{
#if UITEST
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.Bugzilla)]
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.TableView)]
#endif
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Bugzilla, 38112, "Switch becomes reenabled when previous ViewCell is removed from TableView", PlatformAffected.Android)]
Expand Down
Expand Up @@ -12,6 +12,7 @@ namespace Microsoft.Maui.Controls.ControlGallery.Issues
{
#if UITEST
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.Bugzilla)]
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.TableView)]
#endif
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Bugzilla, 39486, "HasUnevenRows=true ignored in Forms iOS project in TableView with CustomCell; row heights are not auto-sized")]
Expand Down
Expand Up @@ -225,7 +225,6 @@ public PatientViewModel(string code)


#if UITEST
[Microsoft.Maui.Controls.Compatibility.UITests.FailsOnMauiAndroid]
[Microsoft.Maui.Controls.Compatibility.UITests.FailsOnMauiIOS]
[Test]
public void Bugzilla40704HeaderPresentTest()
Expand Down
Expand Up @@ -99,7 +99,6 @@ protected override void Init()
}

#if UITEST
[Microsoft.Maui.Controls.Compatibility.UITests.FailsOnMauiAndroid]
[Microsoft.Maui.Controls.Compatibility.UITests.FailsOnMauiIOS]
[Test]
public void GridIsEnabled()
Expand Down
Expand Up @@ -11,6 +11,7 @@ namespace Microsoft.Maui.Controls.ControlGallery.Issues
{
#if UITEST
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.Bugzilla)]
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.TableView)]
#endif
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Bugzilla, 49304, "[UWP] ScrollView and ListView are not scrolling after rotation", PlatformAffected.UWP)]
Expand Down
Expand Up @@ -80,4 +80,4 @@ public void Issue51503Test()
}
#endif
}
}
}
Expand Up @@ -16,6 +16,7 @@ namespace Microsoft.Maui.Controls.ControlGallery.Issues
#if UITEST
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.Bugzilla)]
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.UwpIgnore)]
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.TableView)]
#endif
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Bugzilla, 57317, "Modifying Cell.ContextActions can crash on Android", PlatformAffected.Android)]
Expand Down
Expand Up @@ -12,6 +12,7 @@ namespace Microsoft.Maui.Controls.ControlGallery.Issues
#if UITEST
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.Bugzilla)]
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.UwpIgnore)]
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.TableView)]
#endif
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Bugzilla, 59580, "Raising Command.CanExecutChanged causes crash on Android",
Expand Down
Expand Up @@ -101,7 +101,6 @@ public void TimePickerOther()
[Test]
// Tests runs locally without issues but doesn't run successfully in a hosted agent yet
[Category(UITestCategories.UwpIgnore)]
[FailsOnMauiAndroid]
[FailsOnMauiIOS]
public void DatePickerDMY()
{
Expand All @@ -122,7 +121,6 @@ public void DatePickerDMY()
[Test]
// Tests runs locally without issues but doesn't run successfully in a hosted agent yet
[Category(UITestCategories.UwpIgnore)]
[FailsOnMauiAndroid]
[FailsOnMauiIOS]
public void DatePickerMissing()
{
Expand All @@ -140,7 +138,6 @@ public void DatePickerMissing()

#if !WINDOWS
[Test]
[FailsOnMauiAndroid]
[FailsOnMauiIOS]
public void DatePickerLetters()
{
Expand Down
Expand Up @@ -35,12 +35,16 @@ public class GestureBubblingTests : TestNavigationPage
static NavigationPage NavigationPage;

#if UITEST
[Microsoft.Maui.Controls.Compatibility.UITests.FailsOnMauiAndroid]
[Microsoft.Maui.Controls.Compatibility.UITests.FailsOnMauiIOS] // on iOS only menuItem=Slider, frameShouldRegisterTap=False fails
[Microsoft.Maui.Controls.Compatibility.UITests.FailsOnMauiIOS] // on iOS only menuItem=Slider, frameShouldRegisterTap=False fails
[Test, TestCaseSource(nameof(TestCases))]
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.UwpIgnore)]
public void VerifyTapBubbling(string menuItem, bool frameShouldRegisterTap)
{
if (menuItem == "Frame" && frameShouldRegisterTap)
{
Assert.Ignore("FailsOnMauiAndroid");
}

var results = RunningApp.WaitForElement(q => q.Marked(menuItem));

if (results.Length > 1)
Expand Down
Expand Up @@ -117,7 +117,6 @@ protected override void Init()
#if UITEST
[Test]
[Compatibility.UITests.FailsOnMauiIOS]
[Compatibility.UITests.FailsOnMauiAndroid]
public void CollectionViewInfiniteScroll()
{
RunningApp.WaitForElement("CollectionView5623");
Expand Down
Expand Up @@ -29,11 +29,15 @@ public class InputTransparentTests : TestNavigationPage
static NavigationPage NavigationPage;

#if UITEST
[Microsoft.Maui.Controls.Compatibility.UITests.FailsOnMauiAndroid]
[Microsoft.Maui.Controls.Compatibility.UITests.FailsOnMauiIOS] // Only menuItem=Frame fails on iOS
[Microsoft.Maui.Controls.Compatibility.UITests.FailsOnMauiIOS] // Only menuItem=Frame fails on iOS
[Test, TestCaseSource(nameof(TestCases))]
public void VerifyInputTransparent(string menuItem)
{
if (menuItem == "BoxView" || menuItem == "Image" || menuItem == "Label")
{
Assert.Ignore("FailsOnMauiAndroid");
}

var results = RunningApp.WaitForElement(q => q.Marked(menuItem));

if(results.Length > 1)
Expand Down
Expand Up @@ -10,6 +10,10 @@ namespace Microsoft.Maui.Controls.ControlGallery.Issues
{
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Github, 1028, "ViewCell in TableView raises exception - root page is ContentPage, Content is TableView", PlatformAffected.WinPhone, NavigationBehavior.PushModalAsync)]

#if UITEST
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.TableView)]
#endif
public class Issue1028 : TestContentPage
{
// Issue1028, ViewCell with StackLayout causes exception when nested in a table section. This occurs when the app's root page is a ContentPage with a TableView.
Expand Down
Expand Up @@ -65,7 +65,6 @@ void Button_Clicked(object sender, EventArgs e)

#if UITEST
[Test]
[Compatibility.UITests.FailsOnMauiAndroid]
[Compatibility.UITests.FailsOnMauiIOS]
public void CarouselViewPositionFromVisibilityChangeTest()
{
Expand Down
Expand Up @@ -68,6 +68,7 @@ protected override void Init()
#if UITEST
[Test]
[Compatibility.UITests.FailsOnMauiIOS]
[Compatibility.UITests.FailsOnMauiAndroid]
public async Task RotatingCarouselViewHTMLShouldNotDisappear()
{
int delay = 3000;
Expand Down
Expand Up @@ -123,7 +123,6 @@ public void Issue12574Test()

[Test]
[Compatibility.UITests.FailsOnMauiIOS]
[Compatibility.UITests.FailsOnMauiAndroid]
public void RemoveItemsQuickly()
{
RunningApp.WaitForElement("0 item");
Expand Down
Expand Up @@ -11,6 +11,7 @@ namespace Microsoft.Maui.Controls.ControlGallery.Issues
{
#if UITEST
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.Github5000)]
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.TableView)]
#endif
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Github, 1259, "Layout issue with SwitchCell", PlatformAffected.Android)]
Expand Down
Expand Up @@ -6,6 +6,7 @@ namespace Microsoft.Maui.Controls.ControlGallery.Issues
{
#if UITEST
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.Github5000)]
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.TableView)]
#endif
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Github, 1386,
Expand Down
Expand Up @@ -24,6 +24,7 @@ public FlyoutPageToolbarBug()
}
#if UITEST
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.Github5000)]
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.TableView)]
#endif
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Github, 1598, "FlyoutPageContainer does not handle adding of views which are already its children", PlatformAffected.Android)]
Expand Down
Expand Up @@ -17,6 +17,7 @@ namespace Microsoft.Maui.Controls.ControlGallery.Issues
{
#if UITEST
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.Github5000)]
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.TableView)]
#endif
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Github, 1777, "Adding picker items when picker is in a ViewCell breaks", PlatformAffected.WinPhone)]
Expand Down
Expand Up @@ -143,7 +143,6 @@ public SubItem(string text)
#if UITEST
[Test]
[Compatibility.UITests.FailsOnMauiIOS]
[Compatibility.UITests.FailsOnMauiAndroid]
public void UpdatingSourceOfDisposedListViewDoesNotCrash()
{
RunningApp.Tap(Go);
Expand Down
Expand Up @@ -8,6 +8,9 @@ namespace Microsoft.Maui.Controls.ControlGallery.Issues
{
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Github, 214, "TextCell DetailColor change not immediate", PlatformAffected.iOS)]
#if UITEST
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.TableView)]
#endif
public class Issue214 : ContentPage
{
public Issue214()
Expand Down
Expand Up @@ -10,6 +10,9 @@ namespace Microsoft.Maui.Controls.ControlGallery.Issues
{
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Github, 2143, "Picker on windows phone", PlatformAffected.WinPhone)]
#if UITEST
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.TableView)]
#endif
public class Issue2143 : ContentPage
{
public Issue2143()
Expand Down
Expand Up @@ -11,6 +11,9 @@ namespace Microsoft.Maui.Controls.ControlGallery.Issues
{
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Bugzilla, 22246, "Entry in Grid nested in ViewCell isn't expanding", PlatformAffected.WinPhone, NavigationBehavior.PushModalAsync)]
#if UITEST
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.TableView)]
#endif
public class Issue22246Bz : ContentPage
{
public Issue22246Bz()
Expand Down
Expand Up @@ -93,7 +93,6 @@ static FlyoutPageNavigation FlyoutPageHost


#if UITEST
[Microsoft.Maui.Controls.Compatibility.UITests.FailsOnMauiAndroid]
[Microsoft.Maui.Controls.Compatibility.UITests.FailsOnMauiIOS]
[Test]
public void SwapMainPageWithFlyoutPages()
Expand Down
Expand Up @@ -14,6 +14,7 @@ namespace Microsoft.Maui.Controls.ControlGallery.Issues
#if UITEST
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.Github5000)]
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.UwpIgnore)]
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.TableView)]
#endif
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Github, 2414, "NullReferenceException when swiping over Context Actions", PlatformAffected.WinPhone)]
Expand Down
Expand Up @@ -8,6 +8,9 @@ namespace Microsoft.Maui.Controls.ControlGallery.Issues
{
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Github, 260, "Layout issue for TableView", PlatformAffected.WinPhone)]
#if UITEST
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.TableView)]
#endif
public class Issue260 : ContentPage
{
public Issue260()
Expand Down
Expand Up @@ -6,6 +6,9 @@ namespace Microsoft.Maui.Controls.ControlGallery.Issues
{
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Github, 2615, "iOS Cell Reuse screws up when cells are both ViewCell with different children", PlatformAffected.iOS)]
#if UITEST
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.TableView)]
#endif
public class Issue2615 : ContentPage
{
public Issue2615()
Expand Down
Expand Up @@ -45,7 +45,6 @@ protected override void Init()
}

#if UITEST
[Microsoft.Maui.Controls.Compatibility.UITests.FailsOnMauiAndroid]
[Microsoft.Maui.Controls.Compatibility.UITests.FailsOnMauiIOS]
[Test]
public void Issue2767Test()
Expand Down
Expand Up @@ -10,6 +10,7 @@ namespace Microsoft.Maui.Controls.ControlGallery.Issues
{
#if UITEST
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.Github5000)]
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.TableView)]
#endif
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Github, 2794, "TableView does not react on underlying collection change", PlatformAffected.Android)]
Expand Down Expand Up @@ -69,7 +70,7 @@ protected void Delete(object parameters)
}

#if UITEST && __ANDROID__
[Microsoft.Maui.Controls.Compatibility.UITests.FailsOnMauiAndroid]
[Microsoft.Maui.Controls.Compatibility.UITests.FailsOnMauiAndroid]
[Test]
public void Issue2794Test()
{
Expand Down

0 comments on commit 7d53718

Please sign in to comment.