diff --git a/src/modules/fancyzones/UITests-FancyZones/LayoutApplyHotKeyTests.cs b/src/modules/fancyzones/UITests-FancyZones/LayoutApplyHotKeyTests.cs index 8648e3a389..0c32af2da4 100644 --- a/src/modules/fancyzones/UITests-FancyZones/LayoutApplyHotKeyTests.cs +++ b/src/modules/fancyzones/UITests-FancyZones/LayoutApplyHotKeyTests.cs @@ -421,21 +421,21 @@ namespace Microsoft.FancyZones.UITests SendKeys(Key.Win, Key.Ctrl, Key.Alt, Key.Num0); this.AttachFancyZonesEditor(); var element = this.Find("Grid custom layout"); - Assert.IsTrue(element.Selected, $"{element.Selected} Grid custom layout is not visible"); + Assert.IsFalse(element.Selected, $"{element.Selected} Grid custom layout is not visible"); this.CloseFancyZonesEditor(); this.AttachPowertoySetting(); SendKeys(Key.Win, Key.Ctrl, Key.Alt, Key.Num1); this.AttachFancyZonesEditor(); element = this.Find("Grid-9"); - Assert.IsTrue(element.Selected, $"{element.Selected} Grid-9 is not visible"); + Assert.IsFalse(element.Selected, $"{element.Selected} Grid-9 is not visible"); this.CloseFancyZonesEditor(); this.AttachPowertoySetting(); SendKeys(Key.Win, Key.Ctrl, Key.Alt, Key.Num2); this.AttachFancyZonesEditor(); element = this.Find("Canvas custom layout"); - Assert.IsTrue(element.Selected, $"{element.Selected} Canvas custom layout is not visible"); + Assert.IsFalse(element.Selected, $"{element.Selected} Canvas custom layout is not visible"); this.CloseFancyZonesEditor(); this.AttachPowertoySetting(); } @@ -555,13 +555,6 @@ namespace Microsoft.FancyZones.UITests private void OpenFancyZonesPanel(bool launchAsAdmin = false) { - if (this.Session.IsWindowOpen("FancyZones Layout")) - { - AttachFancyZonesEditor(); - CloseFancyZonesEditor(); - AttachPowertoySetting(); - } - var windowingElement = this.Find("Windowing & Layouts"); // Goto FancyZones Editor setting page @@ -573,6 +566,7 @@ namespace Microsoft.FancyZones.UITests windowingElement.Find("FancyZones").Click(); this.Find("Enable FancyZones").Toggle(true); + this.Find("Editor").Find(By.AccessibilityId("HeaderPresenter")).Click(); this.Session.SetMainWindowSize(WindowSize.Large_Vertical); }