Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FancyZones] Tests: FZEditor #32068

Open
wants to merge 79 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
77ef982
add name to monitors list
SeraphimaZykova Nov 20, 2023
ef35c5f
click item
SeraphimaZykova Nov 20, 2023
8c8a06b
click monitor test
SeraphimaZykova Nov 20, 2023
d6c744d
added ui initialization tests
SeraphimaZykova Nov 20, 2023
45bd2ad
moved enum
SeraphimaZykova Mar 22, 2024
04e85d8
get zone slider
SeraphimaZykova Nov 20, 2023
495fd38
save and cancel clicks
SeraphimaZykova Nov 20, 2023
9ee4970
handy assert
SeraphimaZykova Nov 20, 2023
a5d6eae
fix layout name
SeraphimaZykova Nov 20, 2023
8df25c1
separate io helpers
SeraphimaZykova Nov 20, 2023
e7e0366
template zone number test
SeraphimaZykova Nov 20, 2023
13dd37e
accessibility ids
SeraphimaZykova Nov 22, 2023
f06558d
wait
SeraphimaZykova Nov 22, 2023
becb361
template layouts tests
SeraphimaZykova Nov 22, 2023
bdf4429
rename test class
SeraphimaZykova Nov 23, 2023
4a7024b
rename template layouts constants
SeraphimaZykova Mar 22, 2024
9474a55
wait
SeraphimaZykova Nov 24, 2023
fc95971
replace assert when searching a layout
SeraphimaZykova Nov 24, 2023
4fe650e
spelling
SeraphimaZykova Nov 24, 2023
c6db64b
custom layouts tests
SeraphimaZykova Nov 24, 2023
9fc2b25
changed test initialization
SeraphimaZykova Nov 24, 2023
c4a452e
fix name checks
SeraphimaZykova Nov 24, 2023
d5ca870
fix: restore name
SeraphimaZykova Nov 24, 2023
634aa4f
template layouts: save-cancel tests
SeraphimaZykova Mar 22, 2024
eced774
restore applied layouts
SeraphimaZykova Nov 27, 2023
e090161
custom layouts initialization
SeraphimaZykova Nov 27, 2023
bb36bf6
restore applied layouts with editor params
SeraphimaZykova Nov 27, 2023
cfb9a27
log if element not displayed
SeraphimaZykova Nov 27, 2023
2334c7a
always add "None" value
SeraphimaZykova Nov 28, 2023
30c3df5
rename context click
SeraphimaZykova Nov 28, 2023
7575686
consider error dialog on closing
SeraphimaZykova Nov 29, 2023
fb0978d
wait less
SeraphimaZykova Nov 29, 2023
a4973c5
changed assert message
SeraphimaZykova Nov 29, 2023
53f9244
click
SeraphimaZykova Nov 29, 2023
5cbe253
remove io helper dtor
SeraphimaZykova Nov 29, 2023
fc0b1e7
hotkey tests
SeraphimaZykova Nov 29, 2023
c8dd5e5
changed the order of template layouts
SeraphimaZykova Dec 15, 2023
7bfc29a
correct names
SeraphimaZykova Dec 15, 2023
e1285ae
added retry attempts to wait
SeraphimaZykova Dec 15, 2023
e6a1e9d
replaced assert with log
SeraphimaZykova Dec 15, 2023
00f7b34
added hotkey test
SeraphimaZykova Dec 15, 2023
9ea8773
default layouts tests
SeraphimaZykova Dec 15, 2023
f6ba968
spelling
SeraphimaZykova Dec 15, 2023
e7ddc6e
build fix
SeraphimaZykova Dec 15, 2023
69c9c91
fix after conflicts
SeraphimaZykova Mar 22, 2024
016030a
update tests
SeraphimaZykova Mar 22, 2024
37409fb
interact with context menu items
SeraphimaZykova Mar 4, 2024
4d0f043
copy layout tests
SeraphimaZykova Mar 4, 2024
76e5599
applied layouts initialization tests
SeraphimaZykova Mar 5, 2024
951e716
added applied layouts tests
SeraphimaZykova Mar 7, 2024
0b3fafb
keep other applied layouts tests
SeraphimaZykova Mar 7, 2024
af2bdd3
delete layout tests
SeraphimaZykova Mar 8, 2024
120bcae
fix: refresh hotkeys
SeraphimaZykova Mar 8, 2024
e6da936
fix: serialize data after deletion
SeraphimaZykova Mar 8, 2024
bf932d4
reduce waiting time
SeraphimaZykova Mar 8, 2024
b945043
rename clicks
SeraphimaZykova Mar 22, 2024
b382971
rename
SeraphimaZykova Mar 12, 2024
df01bcb
creation tests
SeraphimaZykova Mar 12, 2024
1e988b4
fix: not restoring the layout when called from context menu
SeraphimaZykova Mar 15, 2024
384a8b0
edit layout tests
SeraphimaZykova Mar 18, 2024
8073777
refactoring
SeraphimaZykova Mar 22, 2024
865ae7c
name constants
SeraphimaZykova Mar 18, 2024
45d7660
replaced one-line getters
SeraphimaZykova Mar 22, 2024
3868654
wait popup
SeraphimaZykova Mar 18, 2024
7c61573
replace cilcks
SeraphimaZykova Mar 18, 2024
7dd4e87
update constants
SeraphimaZykova Mar 22, 2024
8137451
refactoring
SeraphimaZykova Mar 22, 2024
3517443
LayoutType enum extension
SeraphimaZykova Mar 22, 2024
ac93bdd
CustomLayout enum extension
SeraphimaZykova Mar 22, 2024
063887d
layout type enum order
SeraphimaZykova Mar 22, 2024
eeb83c8
fix: hotkey change cancel
SeraphimaZykova Mar 25, 2024
83bb5af
release splitter
SeraphimaZykova Mar 25, 2024
288fee6
editing tests update
SeraphimaZykova Mar 25, 2024
95749c1
removed clicks
SeraphimaZykova Mar 25, 2024
c421e28
fix selected monitor
SeraphimaZykova Mar 26, 2024
029db21
changed waiting
SeraphimaZykova Mar 26, 2024
25a80d0
first launch test
SeraphimaZykova Mar 26, 2024
e53d9e9
Merge branch 'main' into dev/seraphima/tests/29239-fancyzones-tests-f…
SeraphimaZykova Mar 27, 2024
91365a3
missing data in test
SeraphimaZykova Mar 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 0 additions & 35 deletions src/modules/fancyzones/FancyZonesEditorCommon/Data/Constants.cs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

namespace FancyZonesEditorCommon.Data
{
public enum CustomLayout
{
Canvas,
Grid,
}

public static class CustomLayoutEnumExtension
{
private const string CanvasJsonTag = "canvas";
private const string GridJsonTag = "grid";

public static string TypeToString(this CustomLayout value)
{
switch (value)
{
case CustomLayout.Canvas:
return CanvasJsonTag;
case CustomLayout.Grid:
return GridJsonTag;
}

return CanvasJsonTag;
}

public static CustomLayout TypeFromString(string value)
{
switch (value)
{
case CanvasJsonTag:
return CustomLayout.Canvas;
case GridJsonTag:
return CustomLayout.Grid;
}

return CustomLayout.Canvas;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

namespace FancyZonesEditorCommon.Data
{
public enum LayoutType
{
Blank,
Focus,
Columns,
Rows,
Grid,
PriorityGrid,
Custom,
}

public static class LayoutTypeEnumExtension
{
private const string BlankJsonTag = "blank";
private const string FocusJsonTag = "focus";
private const string RowsJsonTag = "rows";
private const string ColumnsJsonTag = "columns";
private const string GridJsonTag = "grid";
private const string PriorityGridJsonTag = "priority-grid";
private const string CustomLayoutJsonTag = "custom";

public static string TypeToString(this LayoutType value)
{
switch (value)
{
case LayoutType.Blank:
return BlankJsonTag;
case LayoutType.Focus:
return FocusJsonTag;
case LayoutType.Rows:
return RowsJsonTag;
case LayoutType.Columns:
return ColumnsJsonTag;
case LayoutType.Grid:
return GridJsonTag;
case LayoutType.PriorityGrid:
return PriorityGridJsonTag;
}

return CustomLayoutJsonTag;
}

public static LayoutType TypeFromString(string value)
{
switch (value)
{
case BlankJsonTag:
return LayoutType.Blank;
case FocusJsonTag:
return LayoutType.Focus;
case RowsJsonTag:
return LayoutType.Rows;
case ColumnsJsonTag:
return LayoutType.Columns;
case GridJsonTag:
return LayoutType.Grid;
case PriorityGridJsonTag:
return LayoutType.PriorityGrid;
}

return LayoutType.Custom;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

namespace FancyZonesEditorCommon.Data
{
public enum MonitorConfigurationType
{
Horizontal = 0,
Vertical,
}

public static class MonitorConfigurationTypeEnumExtensions
{
private const string HorizontalJsonTag = "horizontal";
private const string VerticalJsonTag = "vertical";

public static string TypeToString(this MonitorConfigurationType value)
Copy link
Preview

Copilot AI Feb 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a default case to the switch statement to handle unexpected values.

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
{
switch (value)
{
case MonitorConfigurationType.Horizontal:
return HorizontalJsonTag;
case MonitorConfigurationType.Vertical:
return VerticalJsonTag;
}

return HorizontalJsonTag;
}

public static MonitorConfigurationType TypeFromString(string value)
Copy link
Preview

Copilot AI Feb 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a default case to the switch statement to handle unexpected values.

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
{
switch (value)
{
case HorizontalJsonTag:
return MonitorConfigurationType.Horizontal;
case VerticalJsonTag:
return MonitorConfigurationType.Vertical;
}

return MonitorConfigurationType.Horizontal;
}
}
}
Loading
Loading