Skip to content

Commit

Permalink
Change disabled tests to use [TestProperty("Ignore", "True")] (#3088)
Browse files Browse the repository at this point in the history
* Change disabled tests to use [TestProperty("Ignore", "True")] instead of commenting out the value so that they are still detectable.

* Add missed tests
  • Loading branch information
StephenLPeters authored Aug 12, 2020
1 parent 955b74e commit 8e46614
Show file tree
Hide file tree
Showing 21 changed files with 84 additions and 46 deletions.
3 changes: 2 additions & 1 deletion dev/AutoSuggestBox/APITests/AutoSuggestBoxTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ public void VerifyAutoSuggestBoxCornerRadius()

// Disabling flaky test
// https://github.com/microsoft/microsoft-ui-xaml/issues/2363
//[TestMethod]
[TestMethod]
[TestProperty("Ignore", "True")]
public void VerifyVisualTree()
{
var autoSuggestBox = SetupAutoSuggestBox();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ public void VerifyLightsOnMainWindow()
}
}

//[TestMethod]
[TestMethod]
[TestProperty("Ignore", "True")]
//BUGBUG: Bug 18287798: Failure 183760047- Failed: MUXControls.ApiTests.LightConfigurationTests.VerifyLightsOnSecondaryWindow
public void VerifyLightsOnSecondaryWindow()
{
Expand All @@ -107,7 +108,8 @@ public void VerifyLightsAfterResettingContentOnMainWindow()
}

// Disabled due to: Bug 17808897: Test unreliable in master: MUXControls.ApiTests.LightConfigurationTests.VerifyLightsAfterResettingContentOnSecondaryWindow
//[TestMethod]
[TestMethod]
[TestProperty("Ignore", "True")]
public void VerifyLightsAfterResettingContentOnSecondaryWindow()
{
using (var config = new SecondaryWindowLightConfiguration())
Expand All @@ -117,7 +119,8 @@ public void VerifyLightsAfterResettingContentOnSecondaryWindow()
}

// Disabled due to: Bug 17808897: Test unreliable in master: MUXControls.ApiTests.LightConfigurationTests.VerifyLightsAfterResettingContentOnSecondaryWindow
//[TestMethod]
[TestMethod]
[TestProperty("Ignore", "True")]
public void VerifyLightsAttachedDuringLayoutOnSecondaryWindow()
{
using (var config = new SecondaryWindowLightConfiguration())
Expand Down
3 changes: 2 additions & 1 deletion dev/Materials/Reveal/APITests/RevealTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ namespace Windows.UI.Xaml.Tests.MUXControls.ApiTests
[TestClass]
public class RevealTests : ApiTestBase
{
//[TestMethod] TODO: Re-enable once issue #644 is fixed.
[TestMethod] //TODO: Re-enable once issue #644 is fixed.
[TestProperty("Ignore", "True")]
public void ValidateAppBarButtonRevealStyles()
{
AppBarButton buttonLabelsOnRight = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ public void TestCleanup()
}

// Disabled due to: Bug 17762113: MUXControls.InteractionTests.RevealBrushTests.RevealBrushAudit failing in MUXControls in master
//[TestMethod]
[TestMethod]
[TestProperty("Ignore", "True")]
public void RevealBrushAudit()
{
if (PlatformConfiguration.IsOSVersionLessThan(OSVersion.Redstone2))
Expand Down
6 changes: 4 additions & 2 deletions dev/MenuBar/MenuBar_InteractionTests/MenuBarTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ public void TestCleanup()
TestCleanupHelper.Cleanup();
}

//[TestMethod]
[TestMethod]
[TestProperty("Ignore", "True")]
// Disabled due to:
// https://github.com/Microsoft/microsoft-ui-xaml/issues/115
public void BasicMouseInteractionTest()
Expand Down Expand Up @@ -156,7 +157,8 @@ public void KeyboardNavigationWithArrowKeysTest()
}
}

//[TestMethod]
[TestMethod]
[TestProperty("Ignore", "True")]
// Disabled due to: MenuBarTests.KeyboardNavigationWithAccessKeysTest unreliable #135
public void KeyboardNavigationWithAccessKeysTest()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,8 @@ public void VerifySettingsItemTag()
}

// Disabled per GitHub Issue #211
//[TestMethod]
[TestMethod]
[TestProperty("Ignore", "True")]
public void VerifyCanNotAddWUXItems()
{
if (!ApiInformation.IsTypePresent("Windows.UI.Xaml.Controls.NavigationViewItem"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,8 @@ public void NavigationViewDensityChange()
}
}

//[TestMethod]
[TestMethod]
[TestProperty("Ignore", "True")]
// Disabled due to: Bug 18650478: Test instability: NavigationViewTests.TitleBarTest
public void TitleBarTest()
{
Expand Down Expand Up @@ -1100,7 +1101,8 @@ public void AccTypeTest()
}
}

// [TestMethod]
[TestMethod]
[TestProperty("Ignore", "True")]
public void ToolTipTest() // Verify tooltips appear, and that their contents change when headers change
{
var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
Expand Down Expand Up @@ -1163,7 +1165,8 @@ public void ToolTipTest() // Verify tooltips appear, and that their contents cha
}
}

//[TestMethod]
[TestMethod]
[TestProperty("Ignore", "True")]
// Disabled due to: Multiple unreliable NavigationView tests #134
public void KeyboardFocusToolTipTest() // Verify tooltips appear when Keyboard focused
{
Expand Down Expand Up @@ -1227,7 +1230,8 @@ public void KeyboardFocusToolTipTest() // Verify tooltips appear when Keyboard f
}
}

//[TestMethod]
[TestMethod]
[TestProperty("Ignore", "True")]
public void ToolTipCustomContentTest() // Verify tooltips don't appear for custom NavViewItems (split off due to CatGates timeout)
{
if (!PlatformConfiguration.IsOsVersionGreaterThanOrEqual(OSVersion.Redstone3))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ public void VerifyFocusNotLostWhenTabbingWithBackButtonEnabled()
Verify.IsNotNull(focusedElement);
}
}

[TestMethod]
public void EnsureLeftSettingsRetainsFocusAfterOrientationChanges()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,8 @@ public void PaneDisplayModeLeftLeftCompactLeftMinimalTest()
}

//Bug 19342138: Text of navigation menu items text is lost when shrinking the width of the UWP application
//[TestMethod]
[TestMethod]
[TestProperty("Ignore", "True")]
public void EnsurePaneCanBeHidden()
{
using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
Expand All @@ -589,7 +590,8 @@ public void EnsurePaneCanBeHidden()
}

//Bug 19342138: Text of navigation menu items text is lost when shrinking the width of the UWP application
//[TestMethod]
[TestMethod]
[TestProperty("Ignore", "True")]
public void EnsurePaneCanBeHiddenWithFixedWindowSize()
{
using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ public static void ClassInitialize(TestContext testContext)
TestEnvironment.Initialize(testContext);
}

//[TestMethod]
[TestMethod]
[TestProperty("Ignore", "True")]
// Disabled due to: Multiple unreliable NavigationView tests #134
public void SuppressSelectionItemInvokeTest()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ public void TestCleanup()
TestCleanupHelper.Cleanup();
}

// [TestMethod] Disabled pending investigation of 11754081
[TestMethod] //Disabled pending investigation of 11754081
[TestProperty("Ignore", "True")]
public void DeconstructionHandlesCorrectlyTest()
{
using (var setup = new TestSetupHelper("ScrollViewerAdapter Tests")) // This literally clicks the button corresponding to the test page.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ public void TestCleanup()
"Expanded"
};

//[TestMethod]
[TestMethod]
[TestProperty("Ignore", "True")]
//Disabled due to Bug 19603059: RadioMenuFlyoutItemTests is occasionally failing in the lab
public void BasicTest()
{
Expand Down
10 changes: 6 additions & 4 deletions dev/RatingControl/InteractionTests/RatingControlTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,8 @@ public void CanClearEveryValueTest()
}
}

//RatingControlTests.GamepadTest unreliable test #155
//[TestMethod]
[TestMethod]
[TestProperty("Ignore", "True")] //RatingControlTests.GamepadTest unreliable test #155
public void GamepadTest()
{
using (var setup = new TestSetupHelper("RatingControl Tests")) // This literally clicks the button corresponding to the test page.
Expand Down Expand Up @@ -662,7 +662,8 @@ public void ValidateSwitchingItemInfo()
}

// These two tests that try and test live mid-input visual changes are unreliable.
// [TestMethod]
[TestMethod]
[TestProperty("Ignore", "True")]
public void EnsureScaleMaintainedOnTap()
{
using (var setup = new TestSetupHelper("RatingControl Tests")) // This literally clicks the button corresponding to the test page.
Expand Down Expand Up @@ -691,7 +692,8 @@ public void EnsureScaleMaintainedOnTap()
}
}

// [TestMethod]
[TestMethod]
[TestProperty("Ignore", "True")]
public void VerifyRatingItemFallback()
{
// This test is actually performed in the test app itself, so go look at RatingControlPage.xaml.cs for the meat of it.
Expand Down
3 changes: 2 additions & 1 deletion dev/Repeater/APITests/FlowLayoutCollectionChangeTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,8 @@ public void EnsureReplaceOfAnchorDoesNotResetAllContainers()
});
}

//[TestMethod]
[TestMethod]
[TestProperty("Ignore", "True")]
public void ReplaceMultipleItems()
{
// TODO: Lower prioirty scenario. Tracked by work item: 9738020
Expand Down
14 changes: 9 additions & 5 deletions dev/Repeater/APITests/ViewManagerTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

using Windows.UI.Xaml.Tests.MUXControls.ApiTests.RepeaterTests.Common;
Expand Down Expand Up @@ -85,7 +85,8 @@ public void CanQueryElementFactory()
});
}

// [TestMethod] Issue #1018
[TestMethod] //Issue #1018
[TestProperty("Ignore", "True")]
public void CanPinFocusedElements()
{
// Setup a grouped repeater scenario with two groups each containing two items.
Expand Down Expand Up @@ -186,7 +187,8 @@ public void CanPinFocusedElements()
});
}

// [TestMethod] Issue 1018
[TestMethod] //Issue 1018
[TestProperty("Ignore", "True")]
public void CanReuseElementsDuringUniqueIdReset()
{
var data = new WinRTCollection(Enumerable.Range(0, 2).Select(i => string.Format("Item #{0}", i)));
Expand Down Expand Up @@ -658,7 +660,8 @@ public void ValidateDataContextGetsPropagated()
});
}

// [TestMethod] Issue 1018
[TestMethod]// Issue 1018
[TestProperty("Ignore", "True")]
public void ValidateFocusMoveOnElementCleared()
{
ItemsRepeater repeater = null;
Expand Down Expand Up @@ -702,7 +705,8 @@ public void ValidateFocusMoveOnElementCleared()
});
}

// [TestMethod] Issue 1018
[TestMethod] //Issue 1018
[TestProperty("Ignore", "True")]
public void ValidateFocusMoveOnElementClearedWithUniqueIds()
{
ItemsRepeater repeater = null;
Expand Down
9 changes: 6 additions & 3 deletions dev/Repeater/APITests/ViewportTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ public void ValidateNoScrollingSurfaceScenario()
});
}

// [TestMethod] Temporarily disabled for bug 18866003
[TestMethod]// Temporarily disabled for bug 18866003
[TestProperty("Ignore", "True")]
public void ValidateItemsRepeaterScrollHostScenario()
{
var realizationRects = new List<Rect>();
Expand Down Expand Up @@ -840,7 +841,8 @@ public void ValidateSuggestedElement()
});
}

// [TestMethod] Temporarily disabled for bug 18866003
[TestMethod]// Temporarily disabled for bug 18866003
[TestProperty("Ignore", "True")]
public void ValidateLoadUnload()
{
if (!PlatformConfiguration.IsOsVersionGreaterThan(OSVersion.Redstone2))
Expand Down Expand Up @@ -990,7 +992,8 @@ public void ValidateLoadUnload()

// Test is flaky - disabling it while debugging the issue.
// Bug 17581054: RepeaterTests.ViewportTests.CanBringIntoViewElements is failing on RS4
// [TestMethod]
[TestMethod]
[TestProperty("Ignore", "True")]
public void CanBringIntoViewElements()
{
if (!PlatformConfiguration.IsOsVersionGreaterThan(OSVersion.Redstone3))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,9 @@ private void ScrollWithMouseWheel(bool useCustomMouseWheelScrollLines)
}
}

//[TestMethod]
//[TestProperty("Description", "Pinch a Rectangle in a ScrollPresenter.")]
[TestMethod]
[TestProperty("Description", "Pinch a Rectangle in a ScrollPresenter.")]
[TestProperty("Ignore", "True")]
// Disabled due to: ScrollPresenterTestsWithInputHelper Pinch/Stretch tests fail on RS5 in Helix #132
public void PinchRectangle()
{
Expand Down Expand Up @@ -484,8 +485,9 @@ public void PinchRectangle()
while (additionalAttempts > 0);
}

//[TestMethod]
//[TestProperty("Description", "Stretch an Image in a ScrollPresenter.")]
[TestMethod]
[TestProperty("Description", "Stretch an Image in a ScrollPresenter.")]
[TestProperty("Ignore", "True")]
// Disable due to: ScrollPresenterTestsWithInputHelper Pinch/Stretch tests fail on RS5 in Helix #132
public void StretchImage()
{
Expand Down Expand Up @@ -582,8 +584,9 @@ public void StretchImage()
while (additionalAttempts > 0);
}

//[TestMethod]
//[TestProperty("Description", "Pinch a Rectangle in a ScrollPresenter with the mouse wheel.")]
[TestMethod]
[TestProperty("Description", "Pinch a Rectangle in a ScrollPresenter with the mouse wheel.")]
[TestProperty("Ignore", "True")]
// Disabled due to: ScrollPresenterTestsWithInputHelper Pinch/Stretch tests fail on RS5 in Helix #132
public void PinchRectangleWithMouseWheel()
{
Expand Down Expand Up @@ -675,8 +678,9 @@ public void PinchRectangleWithMouseWheel()
}

//Test failures with keyboard/gamepad/mousewheel input #269
//[TestMethod]
//[TestProperty("Description", "Stretch an Image in a ScrollPresenter with the mouse wheel.")]
[TestMethod]
[TestProperty("Description", "Stretch an Image in a ScrollPresenter with the mouse wheel.")]
[TestProperty("Ignore", "True")]
public void StretchImageWithMouseWheel()
{
Log.Comment("Selecting ScrollPresenter tests");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,8 @@ public void CanSwipeAndTapSecondRevealedItemVertical()
}
}

//[TestMethod] replace with Dmitry's more reliable method
[TestMethod]// replace with Dmitry's more reliable method
[TestProperty("Ignore", "True")]
public void SwipeDoesntJumpWhenItReverts()
{
using (var setup = new TestSetupHelper("SwipeControl Tests"))
Expand Down
6 changes: 4 additions & 2 deletions dev/TeachingTip/InteractionTests/TeachingTipTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,8 @@ public void TipFollowsTargetOnWindowResize()
}
}

// [TestMethod] // Not currently passing, tracked by issue #643
[TestMethod] // Not currently passing, tracked by issue #643
[TestProperty("Ignore", "True")]
public void AutoPlacement()
{
using (var setup = new TestSetupHelper("TeachingTip Tests"))
Expand Down Expand Up @@ -638,7 +639,8 @@ public void VerifyTheming()
}
}

//[TestMethod] Disabled with issue #1769
[TestMethod] //Disabled with issue #1769
[TestProperty("Ignore", "True")]
public void SettingTitleOrSubtitleToEmptyStringCollapsesTextBox()
{
using (var setup = new TestSetupHelper("TeachingTip Tests"))
Expand Down
3 changes: 2 additions & 1 deletion dev/TreeView/APITests/TreeViewTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,8 @@ public void TreeViewUpdateTest()
});
}

//[TestMethod] Disabled with issue number #1775
[TestMethod]// Disabled with issue number #1775
[TestProperty("Ignore", "True")]
public void TreeViewInheritanceTest()
{
RunOnUIThread.Execute(() =>
Expand Down
Loading

0 comments on commit 8e46614

Please sign in to comment.