mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 18:26:39 +02:00
[FancyZones]Modern apps snapping fix, refactor and tests (#29499)
* popup windows check
* use minimize maximize buttons check
* update test utils
* added tests
* define types for easier testing
* changed checks order
* remove option check
* upd test
* remove FZ popup option
* max min buttons -> caption
* calculator test
* updated excluded tests
* add asserts to child window test
* update window creation
* splash screen refactor
* remove hotfix part
* replace style checking functions
* remove no longer necessary check
* tool window check fix
* fix mouse snapping check
* added check and test for non-root window
* spelling
* Revert "remove FZ popup option"
This reverts commit 26732ad683.
* skip child window tests in CI
* remove the option
* remove the constant
* updated tests
This commit is contained in:
@@ -70,7 +70,6 @@ namespace ViewModelTests
|
||||
Assert.AreEqual(originalSettings.Properties.FancyzonesZoneHighlightColor.Value, viewModel.ZoneHighlightColor);
|
||||
Assert.AreEqual(originalSettings.Properties.FancyzonesZoneSetChangeMoveWindows.Value, viewModel.ZoneSetChangeMoveWindows);
|
||||
Assert.AreEqual(originalSettings.Properties.UseCursorposEditorStartupscreen.Value, viewModel.UseCursorPosEditorStartupScreen);
|
||||
Assert.AreEqual(originalSettings.Properties.FancyzonesAllowPopupWindowSnap.Value, viewModel.AllowPopupWindowSnap);
|
||||
Assert.AreEqual(originalSettings.Properties.FancyzonesAllowChildWindowSnap.Value, viewModel.AllowChildWindowSnap);
|
||||
Assert.AreEqual(originalSettings.Properties.FancyzonesDisableRoundCornersOnSnap.Value, viewModel.DisableRoundCornersOnWindowSnap);
|
||||
|
||||
@@ -449,24 +448,6 @@ namespace ViewModelTests
|
||||
Assert.AreEqual(expected, actual);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void AllowPopupWindowsToSnapShouldSetValue2TrueWhenSuccessful()
|
||||
{
|
||||
Mock<SettingsUtils> mockSettingsUtils = new Mock<SettingsUtils>();
|
||||
|
||||
// arrange
|
||||
FancyZonesViewModel viewModel = new FancyZonesViewModel(mockSettingsUtils.Object, SettingsRepository<GeneralSettings>.GetInstance(mockGeneralSettingsUtils.Object), SettingsRepository<FancyZonesSettings>.GetInstance(mockFancyZonesSettingsUtils.Object), sendMockIPCConfigMSG, FancyZonesTestFolderName);
|
||||
Assert.IsFalse(viewModel.AllowPopupWindowSnap); // check if value was initialized to false.
|
||||
|
||||
// act
|
||||
viewModel.AllowPopupWindowSnap = true;
|
||||
|
||||
// assert
|
||||
var expected = viewModel.AllowPopupWindowSnap;
|
||||
var actual = SettingsRepository<FancyZonesSettings>.GetInstance(mockFancyZonesSettingsUtils.Object).SettingsConfig.Properties.FancyzonesAllowPopupWindowSnap.Value;
|
||||
Assert.AreEqual(expected, actual);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void DisableRoundCornersOnSnapShouldSetValue2TrueWhenSuccessful()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user