Skip to content

Commit

Permalink
trying to fix tests - P1
Browse files Browse the repository at this point in the history
rebase some fixes from internal branch
  • Loading branch information
Nirmal4G committed Apr 22, 2022
1 parent c62d29a commit 91dce2a
Show file tree
Hide file tree
Showing 16 changed files with 149 additions and 113 deletions.
5 changes: 3 additions & 2 deletions Directory.Build.rsp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
-NoLogo
-MaxCPUCount
-NodeReuse:True
-Verbosity:Minimal
-BinaryLogger
-NodeReuse:False
-Verbosity:Normal
2 changes: 2 additions & 0 deletions Microsoft.Toolkit.Uwp.Notifications/Common/XmlWriterHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ private static EnumStringAttribute GetEnumStringAttribute(Enum enumValue)
object[] attrs = memberInfo[0].GetCustomAttributes(typeof(EnumStringAttribute), false);

if (attrs != null && attrs.Length > 0)
{
return attrs[0] as EnumStringAttribute;
}
}

return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<NuspecFile>Microsoft.Toolkit.Uwp.Notifications.nuspec</NuspecFile>
</PropertyGroup>

<PropertyGroup Condition="$(TargetFramework.StartsWith('uap10.0')) or '$(TargetFramework)' == 'native'">
<PropertyGroup Condition="$(TargetFramework.StartsWith('uap10.0')) or '$(TargetFramework)' == 'native' or $(TargetFramework.Contains('windows10.0'))">
<TargetPlatformVersion>10.0.$(TargetPlatformRevision).0</TargetPlatformVersion>
</PropertyGroup>

<PropertyGroup Condition="!$(TargetFramework.StartsWith('uap10.0'))">
<DefineConstants>$(DefineConstants);NETFX_CORE</DefineConstants>
<DefineConstants>NETFX_CORE</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'net461' or '$(TargetFramework)' == 'netcoreapp3.1' or $(TargetFramework.Contains('windows10.0'))">
Expand All @@ -29,10 +29,10 @@
<TargetFrameworkIdentifier>.NETCore</TargetFrameworkIdentifier>
<TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
<!-- Misc -->
<CopyLocalLockFileAssemblies>false</CopyLocalLockFileAssemblies>
<DefineConstants>$(DefineConstants);WINDOWS_UAP;WINRT</DefineConstants>
<CopyLocalLockFileAssemblies>false</CopyLocalLockFileAssemblies>
<LanguageTargets>$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets</LanguageTargets>
<!-- Workaround for issue NuGet/Home#8388; Restore conflict in VS IDE 2019 during DesignTime vs BuildTime. -->
<!-- Workaround for issue NuGet/Home#5154; Restore conflict in VS IDE during DesignTime vs BuildTime. -->
<NuGetTargetMoniker Condition="'$(DesignTimeBuild)' != 'true'">UAP,Version=v10.0</NuGetTargetMoniker>
<NuGetTargetMoniker Condition="'$(DesignTimeBuild)' == 'true'">Native,Version=v0.0</NuGetTargetMoniker>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">MIT</license>
<projectUrl>https://github.com/CommunityToolkit/WindowsCommunityToolkit</projectUrl>
<iconUrl>https://raw.githubusercontent.com/CommunityToolkit/WindowsCommunityToolkit/main/build/nuget.png</iconUrl>
<readme>ReadMe.md</readme>
<icon>Icon.png</icon>
<description>The official way to send toast notifications on Windows 10 via code rather than XML, with the help of IntelliSense. Supports all C# app types, including WPF, UWP, WinForms, and Console, even without packaging your app as MSIX. Also supports C++ UWP apps.

Expand All @@ -23,16 +23,23 @@
<dependency id="NETStandard.Library" version="1.6.1" exclude="Build,Analyzers" />
<dependency id="System.ValueTuple" version="4.5.0" exclude="Build,Analyzers" />
</group>
<group targetFramework="UAP10.0.16299">
<dependency id="System.ValueTuple" version="4.5.0" exclude="Build,Analyzers" />
</group>
<group targetFramework=".NETCoreApp3.1">
<dependency id="Microsoft.Win32.Registry" version="4.7.0" exclude="Build,Analyzers" />
<dependency id="Microsoft.Windows.SDK.Contracts" version="10.0.19041.1" exclude="Build,Analyzers" />
<dependency id="System.Drawing.Common" version="4.7.0" exclude="Build,Analyzers" />
<dependency id="System.Reflection.Emit" version="4.7.0" exclude="Build,Analyzers" />
<dependency id="System.ValueTuple" version="4.5.0" exclude="Build,Analyzers" />
</group>
<group targetFramework=".NETFramework4.6.1">
<dependency id="Microsoft.NETFramework.ReferenceAssemblies" version="1.0.2" exclude="Build,Analyzers" />
<dependency id="Microsoft.Windows.SDK.Contracts" version="10.0.19041.1" exclude="Build,Analyzers" />
<dependency id="System.ValueTuple" version="4.5.0" exclude="Build,Analyzers" />
</group>
<group targetFramework="UAP10.0.10240" />
<group targetFramework="UAP10.0.16299">
<dependency id="System.ValueTuple" version="4.5.0" exclude="Build,Analyzers" />
</group>
<group targetFramework="native0.0" />
<group targetFramework="net5.0">
<dependency id="System.ValueTuple" version="4.5.0" exclude="Build,Analyzers" />
</group>
Expand All @@ -42,45 +49,40 @@
<dependency id="System.Reflection.Emit" version="4.7.0" exclude="Build,Analyzers" />
<dependency id="System.ValueTuple" version="4.5.0" exclude="Build,Analyzers" />
</group>
<group targetFramework=".NETFramework4.6.1">
<dependency id="Microsoft.NETFramework.ReferenceAssemblies" version="1.0.0" exclude="Build,Analyzers" />
<dependency id="Microsoft.Windows.SDK.Contracts" version="10.0.19041.1" exclude="Build,Analyzers" />
<dependency id="System.ValueTuple" version="4.5.0" exclude="Build,Analyzers" />
</group>
<group targetFramework="native0.0" />
<group targetFramework="UAP10.0.10240" />
</dependencies>
</metadata>
<files>
<file src="..\build\nuget.png" target="Icon.png" />
<file src="..\license.md" target="" />
<file src="ReadMe.md" target="ReadMe.md" />
<file src="..\License.md" target="License.md" />
<file src="..\build\Icon.png" target="Icon.png" />
<file src="..\ThirdPartyNotices.txt" target="ThirdPartyNotices.txt" />
<file src="Microsoft.Toolkit.Uwp.Notifications.targets" target="build\native\Microsoft.Toolkit.Uwp.Notifications.targets" />
<file src="$buildOutput$\net461\Microsoft.Toolkit.Uwp.Notifications.dll" target="lib\net461\Microsoft.Toolkit.Uwp.Notifications.dll" />
<file src="$buildOutput$\net461\Microsoft.Toolkit.Uwp.Notifications.pdb" target="lib\net461\Microsoft.Toolkit.Uwp.Notifications.pdb" />
<file src="$buildOutput$\net461\Microsoft.Toolkit.Uwp.Notifications.xml" target="lib\net461\Microsoft.Toolkit.Uwp.Notifications.xml" />
<file src="$buildOutput$\net5.0\Microsoft.Toolkit.Uwp.Notifications.dll" target="lib\net5.0\Microsoft.Toolkit.Uwp.Notifications.dll" />
<file src="$buildOutput$\net5.0\Microsoft.Toolkit.Uwp.Notifications.pdb" target="lib\net5.0\Microsoft.Toolkit.Uwp.Notifications.pdb" />
<file src="$buildOutput$\net5.0\Microsoft.Toolkit.Uwp.Notifications.xml" target="lib\net5.0\Microsoft.Toolkit.Uwp.Notifications.xml" />
<file src="$buildOutput$\net5.0-windows10.0.17763\Microsoft.Toolkit.Uwp.Notifications.dll" target="lib\net5.0-windows10.0.17763\Microsoft.Toolkit.Uwp.Notifications.dll" />
<file src="$buildOutput$\net5.0-windows10.0.17763\Microsoft.Toolkit.Uwp.Notifications.pdb" target="lib\net5.0-windows10.0.17763\Microsoft.Toolkit.Uwp.Notifications.pdb" />
<file src="$buildOutput$\net5.0-windows10.0.17763\Microsoft.Toolkit.Uwp.Notifications.xml" target="lib\net5.0-windows10.0.17763\Microsoft.Toolkit.Uwp.Notifications.xml" />
<file src="$buildOutput$\netcoreapp3.1\Microsoft.Toolkit.Uwp.Notifications.dll" target="lib\netcoreapp3.1\Microsoft.Toolkit.Uwp.Notifications.dll" />
<file src="$buildOutput$\netcoreapp3.1\Microsoft.Toolkit.Uwp.Notifications.pdb" target="lib\netcoreapp3.1\Microsoft.Toolkit.Uwp.Notifications.pdb" />
<file src="$buildOutput$\netcoreapp3.1\Microsoft.Toolkit.Uwp.Notifications.xml" target="lib\netcoreapp3.1\Microsoft.Toolkit.Uwp.Notifications.xml" />
<file src="$buildOutput$\netstandard1.4\Microsoft.Toolkit.Uwp.Notifications.dll" target="lib\netstandard1.4\Microsoft.Toolkit.Uwp.Notifications.dll" />
<file src="$buildOutput$\netstandard1.4\Microsoft.Toolkit.Uwp.Notifications.pdb" target="lib\netstandard1.4\Microsoft.Toolkit.Uwp.Notifications.pdb" />
<file src="$buildOutput$\netstandard1.4\Microsoft.Toolkit.Uwp.Notifications.xml" target="lib\netstandard1.4\Microsoft.Toolkit.Uwp.Notifications.xml" />
<file src="$buildOutput$\netcoreapp3.1\Microsoft.Toolkit.Uwp.Notifications.dll" target="lib\netcoreapp3.1\Microsoft.Toolkit.Uwp.Notifications.dll" />
<file src="$buildOutput$\netcoreapp3.1\Microsoft.Toolkit.Uwp.Notifications.pdb" target="lib\netcoreapp3.1\Microsoft.Toolkit.Uwp.Notifications.pdb" />
<file src="$buildOutput$\netcoreapp3.1\Microsoft.Toolkit.Uwp.Notifications.xml" target="lib\netcoreapp3.1\Microsoft.Toolkit.Uwp.Notifications.xml" />
<file src="$buildOutput$\net461\Microsoft.Toolkit.Uwp.Notifications.dll" target="lib\net461\Microsoft.Toolkit.Uwp.Notifications.dll" />
<file src="$buildOutput$\net461\Microsoft.Toolkit.Uwp.Notifications.pdb" target="lib\net461\Microsoft.Toolkit.Uwp.Notifications.pdb" />
<file src="$buildOutput$\net461\Microsoft.Toolkit.Uwp.Notifications.xml" target="lib\net461\Microsoft.Toolkit.Uwp.Notifications.xml" />
<file src="$buildOutput$\uap10.0.16299\Microsoft.Toolkit.Uwp.Notifications.dll" target="lib\uap10.0.16299\Microsoft.Toolkit.Uwp.Notifications.dll" />
<file src="$buildOutput$\uap10.0.16299\Microsoft.Toolkit.Uwp.Notifications.pdb" target="lib\uap10.0.16299\Microsoft.Toolkit.Uwp.Notifications.pdb" />
<file src="$buildOutput$\uap10.0.16299\Microsoft.Toolkit.Uwp.Notifications.pri" target="lib\uap10.0.16299\Microsoft.Toolkit.Uwp.Notifications.pri" />
<file src="$buildOutput$\uap10.0.16299\Microsoft.Toolkit.Uwp.Notifications.xml" target="lib\uap10.0.16299\Microsoft.Toolkit.Uwp.Notifications.xml" />
<file src="$buildOutput$\native\Microsoft.Toolkit.Uwp.Notifications.pdb" target="lib\native\Microsoft.Toolkit.Uwp.Notifications.pdb" />
<file src="$buildOutput$\native\Microsoft.Toolkit.Uwp.Notifications.pri" target="lib\native\Microsoft.Toolkit.Uwp.Notifications.pri" />
<file src="$buildOutput$\native\Microsoft.Toolkit.Uwp.Notifications.winmd" target="lib\native\Microsoft.Toolkit.Uwp.Notifications.winmd" />
<file src="$buildOutput$\native\Microsoft.Toolkit.Uwp.Notifications.xml" target="lib\native\Microsoft.Toolkit.Uwp.Notifications.xml" />
<file src="$buildOutput$\native\Microsoft.Toolkit.Uwp.Notifications.pdb" target="lib\uap10.0.10240\Microsoft.Toolkit.Uwp.Notifications.pdb" />
<file src="$buildOutput$\native\Microsoft.Toolkit.Uwp.Notifications.pri" target="lib\uap10.0.10240\Microsoft.Toolkit.Uwp.Notifications.pri" />
<file src="$buildOutput$\native\Microsoft.Toolkit.Uwp.Notifications.winmd" target="lib\uap10.0.10240\Microsoft.Toolkit.Uwp.Notifications.winmd" />
<file src="$buildOutput$\native\Microsoft.Toolkit.Uwp.Notifications.xml" target="lib\uap10.0.10240\Microsoft.Toolkit.Uwp.Notifications.xml" />
<file src="$buildOutput$\native\Microsoft.Toolkit.Uwp.Notifications.pdb" target="lib\native\Microsoft.Toolkit.Uwp.Notifications.pdb" />
<file src="$buildOutput$\native\Microsoft.Toolkit.Uwp.Notifications.pri" target="lib\native\Microsoft.Toolkit.Uwp.Notifications.pri" />
<file src="$buildOutput$\native\Microsoft.Toolkit.Uwp.Notifications.winmd" target="lib\native\Microsoft.Toolkit.Uwp.Notifications.winmd" />
<file src="$buildOutput$\native\Microsoft.Toolkit.Uwp.Notifications.xml" target="lib\native\Microsoft.Toolkit.Uwp.Notifications.xml" />
<file src="$buildOutput$\net5.0\Microsoft.Toolkit.Uwp.Notifications.dll" target="lib\net5.0\Microsoft.Toolkit.Uwp.Notifications.dll" />
<file src="$buildOutput$\net5.0\Microsoft.Toolkit.Uwp.Notifications.pdb" target="lib\net5.0\Microsoft.Toolkit.Uwp.Notifications.pdb" />
<file src="$buildOutput$\net5.0\Microsoft.Toolkit.Uwp.Notifications.xml" target="lib\net5.0\Microsoft.Toolkit.Uwp.Notifications.xml" />
<file src="$buildOutput$\net5.0-windows10.0.17763\Microsoft.Toolkit.Uwp.Notifications.dll" target="lib\net5.0-windows10.0.17763\Microsoft.Toolkit.Uwp.Notifications.dll" />
<file src="$buildOutput$\net5.0-windows10.0.17763\Microsoft.Toolkit.Uwp.Notifications.pdb" target="lib\net5.0-windows10.0.17763\Microsoft.Toolkit.Uwp.Notifications.pdb" />
<file src="$buildOutput$\net5.0-windows10.0.17763\Microsoft.Toolkit.Uwp.Notifications.xml" target="lib\net5.0-windows10.0.17763\Microsoft.Toolkit.Uwp.Notifications.xml" />
</files>
</package>
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class ColorPickerButtonTest : UITestBase
[TestProperty("Platform", "Any")]
public static void ClassInitialize(TestContext testContext)
{
TestEnvironment.Initialize(testContext, WinUICsUWPSampleApp);
TestEnvironment.Initialize(testContext, WinUICSharpUWPSampleApp);
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class ConstrainedBoxTest : UITestBase
[TestProperty("Platform", "Any")]
public static void ClassInitialize(TestContext testContext)
{
TestEnvironment.Initialize(testContext, WinUICsUWPSampleApp);
TestEnvironment.Initialize(testContext, WinUICSharpUWPSampleApp);
}

[TestMethod]
Expand Down
2 changes: 1 addition & 1 deletion UITests/UITests.Tests.Shared/Controls/GridSplitterTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class GridSplitterTest : UITestBase
[TestProperty("Platform", "Any")]
public static void ClassInitialize(TestContext testContext)
{
TestEnvironment.Initialize(testContext, WinUICsUWPSampleApp);
TestEnvironment.Initialize(testContext, WinUICSharpUWPSampleApp);
}

[TestMethod]
Expand Down
2 changes: 1 addition & 1 deletion UITests/UITests.Tests.Shared/Controls/RangeSelectorTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class RangeSelectorTest : UITestBase
[TestProperty("Platform", "Any")]
public static void ClassInitialize(TestContext testContext)
{
TestEnvironment.Initialize(testContext, WinUICsUWPSampleApp);
TestEnvironment.Initialize(testContext, WinUICSharpUWPSampleApp);
}

[TestMethod]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class RichSuggestBoxTest : UITestBase
[TestProperty("Platform", "Any")]
public static void ClassInitialize(TestContext testContext)
{
TestEnvironment.Initialize(testContext, WinUICsUWPSampleApp);
TestEnvironment.Initialize(testContext, WinUICSharpUWPSampleApp);
}

[TestMethod]
Expand Down
2 changes: 1 addition & 1 deletion UITests/UITests.Tests.Shared/Controls/TextBoxMaskTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class TextBoxMaskTest : UITestBase
[TestProperty("Platform", "Any")]
public static void ClassInitialize(TestContext testContext)
{
TestEnvironment.Initialize(testContext, WinUICsUWPSampleApp);
TestEnvironment.Initialize(testContext, WinUICSharpUWPSampleApp);
}

[TestMethod]
Expand Down
2 changes: 1 addition & 1 deletion UITests/UITests.Tests.Shared/Examples/SimpleTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class SimpleTest : UITestBase
[TestProperty("Platform", "Any")]
public static void ClassInitialize(TestContext testContext)
{
TestEnvironment.Initialize(testContext, WinUICsUWPSampleApp);
TestEnvironment.Initialize(testContext, WinUICSharpUWPSampleApp);
}

[TestMethod]
Expand Down
8 changes: 4 additions & 4 deletions UITests/UITests.Tests.Shared/TestAssembly.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ public static void AssemblyInitialize(TestContext testContext)
[AssemblyCleanup]
public static void AssemblyCleanup()
{
TestEnvironment.AssemblyCleanupWorker(UITestBase.WinUICsUWPSampleApp);
TestEnvironment.AssemblyCleanupWorker(UITestBase.WinUICSharpUWPSampleApp);
}

private static async Task InitalizeComService()
private static async Task InitializeComService()
{
CommunicationService = new AppServiceConnection();

Expand Down Expand Up @@ -84,7 +84,7 @@ internal static async Task<AppServiceResponse> SendCustomMessageToApp(ValueSet m
{
if (CommunicationService is null)
{
await InitalizeComService();
await InitializeComService();
}

return await CommunicationService.SendMessageAsync(message);
Expand All @@ -94,7 +94,7 @@ private static async Task<bool> SendMessageToApp(ValueSet message)
{
if (CommunicationService is null)
{
await InitalizeComService();
await InitializeComService();
}

var response = await CommunicationService.SendMessageAsync(message);
Expand Down
Loading

0 comments on commit 91dce2a

Please sign in to comment.