diff --git a/dev/TabView/InteractionTests/TabViewTests.cs b/dev/TabView/InteractionTests/TabViewTests.cs index 8cb28a8792..2b4d6e2110 100644 --- a/dev/TabView/InteractionTests/TabViewTests.cs +++ b/dev/TabView/InteractionTests/TabViewTests.cs @@ -161,10 +161,14 @@ public void TabSizeAndScrollButtonsTest() // Close a tab to make room. The scroll buttons should disappear: Log.Comment("Closing a tab:"); Button closeButton = FindCloseButton(FindElement.ByName("LongHeaderTab")); + closeButton.MovePointer(0, 0); closeButton.InvokeAndWait(); VerifyElement.NotFound("LongHeaderTab", FindBy.Name); Log.Comment("Scroll buttons should disappear"); + // Leaving tabstrip with this so the tabs update their width + FindElement.ByName - + + diff --git a/dev/TabView/TestUI/TabViewPage.xaml.cs b/dev/TabView/TestUI/TabViewPage.xaml.cs index 8e0a5f652d..a9861bd8e5 100644 --- a/dev/TabView/TestUI/TabViewPage.xaml.cs +++ b/dev/TabView/TestUI/TabViewPage.xaml.cs @@ -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 System; @@ -394,6 +394,12 @@ private void TabViewSizingPageButton_Click(object sender, RoutedEventArgs e) this.Frame.Navigate(typeof(TabViewSizingPage)); } + + private void TabViewTabClosingBehaviorButton_Click(object sender, RoutedEventArgs e) + { + this.Frame.Navigate(typeof(TabViewTabClosingBehaviorPage)); + } + private void ShortLongTextButton_Click(object sender, RoutedEventArgs e) { FirstTab.Header = "s"; diff --git a/dev/TabView/TestUI/TabViewTabClosingBehaviorPage.xaml b/dev/TabView/TestUI/TabViewTabClosingBehaviorPage.xaml new file mode 100644 index 0000000000..f39f3a7f7d --- /dev/null +++ b/dev/TabView/TestUI/TabViewTabClosingBehaviorPage.xaml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +