[Settings] Migrate Fancy Zones Settings Tests (#5762)

* added MSTest project

* [Settings] Migrate Fancy Zones Settings Tests

* fixed errors

* reverted changes to xaml file

* updated varibale for test folder

* add ignore case flag

* fixed Sttings.UI.csproj file

* fixed Sttings.UI.csproj file
This commit is contained in:
Nkateko
2020-08-18 14:46:32 -07:00
committed by GitHub
parent 5e13152c73
commit 953ab958d5
5 changed files with 444 additions and 60 deletions

View File

@@ -1,4 +1,4 @@
 <Page
<Page
x:Class="Microsoft.PowerToys.Settings.UI.Views.FancyZonesPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
@@ -15,7 +15,6 @@
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Page.Resources>
<viewModel:FancyZonesViewModel x:Key="eventViewModel"/>
<converters:StringFormatConverter x:Key="StringFormatConverter"/>
</Page.Resources>
@@ -173,7 +172,7 @@
FontSize="16"
Margin="0,16,0,0"
Foreground="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled, Converter={StaticResource ModuleEnabledToForegroundConverter}}"/>
</StackPanel>
<TextBlock x:Uid="FancyZones_ZoneHighlightColor"

View File

@@ -2,7 +2,7 @@
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using Microsoft.PowerToys.Settings.UI.ViewModels;
using Microsoft.PowerToys.Settings.UI.Lib.ViewModels;
using Windows.UI.Xaml.Controls;
namespace Microsoft.PowerToys.Settings.UI.Views
@@ -13,9 +13,9 @@ namespace Microsoft.PowerToys.Settings.UI.Views
public FancyZonesPage()
{
InitializeComponent();
ViewModel = new FancyZonesViewModel();
MainView.DataContext = ViewModel;
this.InitializeComponent();
ViewModel = new FancyZonesViewModel(ShellPage.SendDefaultIPCMessage);
DataContext = ViewModel;
}
}
}