-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
SeraphimaZykova
wants to merge
79
commits into
main
Choose a base branch
from
dev/seraphima/tests/29239-fancyzones-tests-fzeditor
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+5,464
−257
Open
[FancyZones] Tests: FZEditor #32068
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 ef35c5f
click item
SeraphimaZykova 8c8a06b
click monitor test
SeraphimaZykova d6c744d
added ui initialization tests
SeraphimaZykova 45bd2ad
moved enum
SeraphimaZykova 04e85d8
get zone slider
SeraphimaZykova 495fd38
save and cancel clicks
SeraphimaZykova 9ee4970
handy assert
SeraphimaZykova a5d6eae
fix layout name
SeraphimaZykova 8df25c1
separate io helpers
SeraphimaZykova e7e0366
template zone number test
SeraphimaZykova 13dd37e
accessibility ids
SeraphimaZykova f06558d
wait
SeraphimaZykova becb361
template layouts tests
SeraphimaZykova bdf4429
rename test class
SeraphimaZykova 4a7024b
rename template layouts constants
SeraphimaZykova 9474a55
wait
SeraphimaZykova fc95971
replace assert when searching a layout
SeraphimaZykova 4fe650e
spelling
SeraphimaZykova c6db64b
custom layouts tests
SeraphimaZykova 9fc2b25
changed test initialization
SeraphimaZykova c4a452e
fix name checks
SeraphimaZykova d5ca870
fix: restore name
SeraphimaZykova 634aa4f
template layouts: save-cancel tests
SeraphimaZykova eced774
restore applied layouts
SeraphimaZykova e090161
custom layouts initialization
SeraphimaZykova bb36bf6
restore applied layouts with editor params
SeraphimaZykova cfb9a27
log if element not displayed
SeraphimaZykova 2334c7a
always add "None" value
SeraphimaZykova 30c3df5
rename context click
SeraphimaZykova 7575686
consider error dialog on closing
SeraphimaZykova fb0978d
wait less
SeraphimaZykova a4973c5
changed assert message
SeraphimaZykova 53f9244
click
SeraphimaZykova 5cbe253
remove io helper dtor
SeraphimaZykova fc0b1e7
hotkey tests
SeraphimaZykova c8dd5e5
changed the order of template layouts
SeraphimaZykova 7bfc29a
correct names
SeraphimaZykova e1285ae
added retry attempts to wait
SeraphimaZykova e6a1e9d
replaced assert with log
SeraphimaZykova 00f7b34
added hotkey test
SeraphimaZykova 9ea8773
default layouts tests
SeraphimaZykova f6ba968
spelling
SeraphimaZykova e7ddc6e
build fix
SeraphimaZykova 69c9c91
fix after conflicts
SeraphimaZykova 016030a
update tests
SeraphimaZykova 37409fb
interact with context menu items
SeraphimaZykova 4d0f043
copy layout tests
SeraphimaZykova 76e5599
applied layouts initialization tests
SeraphimaZykova 951e716
added applied layouts tests
SeraphimaZykova 0b3fafb
keep other applied layouts tests
SeraphimaZykova af2bdd3
delete layout tests
SeraphimaZykova 120bcae
fix: refresh hotkeys
SeraphimaZykova e6da936
fix: serialize data after deletion
SeraphimaZykova bf932d4
reduce waiting time
SeraphimaZykova b945043
rename clicks
SeraphimaZykova b382971
rename
SeraphimaZykova df01bcb
creation tests
SeraphimaZykova 1e988b4
fix: not restoring the layout when called from context menu
SeraphimaZykova 384a8b0
edit layout tests
SeraphimaZykova 8073777
refactoring
SeraphimaZykova 865ae7c
name constants
SeraphimaZykova 45d7660
replaced one-line getters
SeraphimaZykova 3868654
wait popup
SeraphimaZykova 7c61573
replace cilcks
SeraphimaZykova 7dd4e87
update constants
SeraphimaZykova 8137451
refactoring
SeraphimaZykova 3517443
LayoutType enum extension
SeraphimaZykova ac93bdd
CustomLayout enum extension
SeraphimaZykova 063887d
layout type enum order
SeraphimaZykova eeb83c8
fix: hotkey change cancel
SeraphimaZykova 83bb5af
release splitter
SeraphimaZykova 288fee6
editing tests update
SeraphimaZykova 95749c1
removed clicks
SeraphimaZykova c421e28
fix selected monitor
SeraphimaZykova 029db21
changed waiting
SeraphimaZykova 25a80d0
first launch test
SeraphimaZykova e53d9e9
Merge branch 'main' into dev/seraphima/tests/29239-fancyzones-tests-f…
SeraphimaZykova 91365a3
missing data in test
SeraphimaZykova File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
35 changes: 0 additions & 35 deletions
35
src/modules/fancyzones/FancyZonesEditorCommon/Data/Constants.cs
This file was deleted.
Oops, something went wrong.
44 changes: 44 additions & 0 deletions
44
src/modules/fancyzones/FancyZonesEditorCommon/Data/CustomLayoutEnumExtension.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} | ||
} |
70 changes: 70 additions & 0 deletions
70
src/modules/fancyzones/FancyZonesEditorCommon/Data/LayoutTypeEnumExtension.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
src/modules/fancyzones/FancyZonesEditorCommon/Data/MonitorConfigurationTypeEnumExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
{ | ||
switch (value) | ||
{ | ||
case MonitorConfigurationType.Horizontal: | ||
return HorizontalJsonTag; | ||
case MonitorConfigurationType.Vertical: | ||
return VerticalJsonTag; | ||
} | ||
|
||
return HorizontalJsonTag; | ||
} | ||
|
||
public static MonitorConfigurationType TypeFromString(string value) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
{ | ||
switch (value) | ||
{ | ||
case HorizontalJsonTag: | ||
return MonitorConfigurationType.Horizontal; | ||
case VerticalJsonTag: | ||
return MonitorConfigurationType.Vertical; | ||
} | ||
|
||
return MonitorConfigurationType.Horizontal; | ||
} | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.