mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-02-23 19:49:43 +01:00
change code
This commit is contained in:
@@ -344,7 +344,7 @@ namespace UITests_FancyZones
|
||||
// Attach FancyZones Editor
|
||||
this.AttachPowertoySetting();
|
||||
this.Find<Pane>(By.ClassName("InputNonClientPointerSource")).Click();
|
||||
this.OpenFancyZonesPanel();
|
||||
this.OpenFancyZonesPanel(isMax: false);
|
||||
this.AttachFancyZonesEditor();
|
||||
var element = this.Find<Element>("Grid custom layout");
|
||||
Assert.IsTrue(element.Selected, "Grid custom layout is not visible");
|
||||
@@ -550,7 +550,7 @@ namespace UITests_FancyZones
|
||||
Clean();
|
||||
}
|
||||
|
||||
private void OpenFancyZonesPanel(bool launchAsAdmin = false)
|
||||
private void OpenFancyZonesPanel(bool launchAsAdmin = false, bool isMax = true)
|
||||
{
|
||||
var windowingElement = this.Find<NavigationViewItem>("Windowing & Layouts");
|
||||
|
||||
@@ -563,7 +563,11 @@ namespace UITests_FancyZones
|
||||
|
||||
windowingElement.Find<Element>("FancyZones").Click();
|
||||
this.Find<ToggleSwitch>("Enable FancyZones").Toggle(true);
|
||||
this.Find<Button>("Maximize").Click(); // maximize the window
|
||||
if (isMax == true)
|
||||
{
|
||||
this.Find<Button>("Maximize").Click(); // maximize the window
|
||||
}
|
||||
|
||||
this.Find<Custom>("Editor").Find<TextBlock>(By.AccessibilityId("HeaderPresenter")).Click();
|
||||
}
|
||||
|
||||
|
||||
@@ -34,9 +34,6 @@ namespace UITests_FancyZones
|
||||
// kill all processes related to FancyZones Editor to ensure a clean state
|
||||
Session.KillAllProcessesByName("PowerToys.FancyZonesEditor");
|
||||
|
||||
// get PowerToys window Name
|
||||
powertoysWindowName = ZoneSwitchHelper.GetActiveWindowTitle();
|
||||
|
||||
// clear the app zone history
|
||||
AppZoneHistory.DeleteFile();
|
||||
FancyZonesEditorHelper.Files.CustomLayoutsIOHelper.DeleteFile();
|
||||
@@ -46,6 +43,9 @@ namespace UITests_FancyZones
|
||||
// set a custom layout with 2 subzones
|
||||
SetupCustomLayouts();
|
||||
|
||||
// get PowerToys window Name
|
||||
powertoysWindowName = ZoneSwitchHelper.GetActiveWindowTitle();
|
||||
|
||||
// Launch FancyZones
|
||||
LaunchFancyZones();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user