Skip to content

Commit a02e60b

Browse files
committed
Try process killing approach
1 parent 280d58d commit a02e60b

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/modules/fancyzones/FancyZones.UITests/DragWindowTests.cs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
using System;
66
using System.Collections.Generic;
7+
using System.Threading;
78
using System.Threading.Tasks;
89
using System.Windows.Forms;
910
using FancyZonesEditor.Models;
@@ -49,18 +50,16 @@ public DragWindowTests()
4950
[TestInitialize]
5051
public void TestInitialize()
5152
{
52-
SettingsConfigHelper.ConfigureGlobalModuleSettings("Hosts");
53-
54-
// kill all processes related to FancyZones Editor to ensure a clean state
55-
Session.KillAllProcessesByName("PowerToys.FancyZonesEditor");
53+
Session.KillAllProcessesByName("PowerToys");
54+
Thread.Sleep(1000);
55+
ClearOpenWindows();
5656

57+
SettingsConfigHelper.ConfigureGlobalModuleSettings("Hosts");
5758
AppZoneHistory.DeleteFile();
5859
FancyZonesEditorHelper.Files.Restore();
5960

60-
// ClearOpenWindows - do this after file operations to ensure Session is ready
61-
ClearOpenWindows();
62-
6361
RestartScopeExe();
62+
Thread.Sleep(2000);
6463

6564
// Set a custom layout with 1 subzones and clear app zone history
6665
SetupCustomLayouts();

0 commit comments

Comments
 (0)