From 0b0d16e3148528d3074cabc167af90688a40482d Mon Sep 17 00:00:00 2001 From: Shane Neuville Date: Thu, 12 Nov 2020 12:16:08 -0600 Subject: [PATCH 1/4] Build 14393 targets separately --- UWP.Build.props | 3 +-- build.cake | 12 +++++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/UWP.Build.props b/UWP.Build.props index c8f98e097b5..7a72440799f 100644 --- a/UWP.Build.props +++ b/UWP.Build.props @@ -3,8 +3,7 @@ $(UwpMinTargetFrameworks) - uap10.0.16299 - uap10.0.14393;uap10.0.16299 + uap10.0.16299 netstandard2.0 diff --git a/build.cake b/build.cake index 1834fb838e5..522b59c9745 100644 --- a/build.cake +++ b/build.cake @@ -798,14 +798,24 @@ Task("BuildForNuget") .WithTarget("rebuild")); + msbuildSettings = GetMSBuildSettings(); + msbuildSettings.BinaryLogger = binaryLogger; + binaryLogger.FileName = $"{artifactStagingDirectory}/win-maps-{configuration}-csproj.binlog"; + MSBuild("./Xamarin.Forms.Maps.UWP/Xamarin.Forms.Maps.UWP.csproj", + msbuildSettings + .WithProperty("UwpMinTargetFrameworks", "uap10.0.14393") + .WithRestore()); + msbuildSettings = GetMSBuildSettings(); msbuildSettings.BinaryLogger = binaryLogger; binaryLogger.FileName = $"{artifactStagingDirectory}/win-{configuration}-csproj.binlog"; MSBuild("./Xamarin.Forms.Platform.UAP/Xamarin.Forms.Platform.UAP.csproj", msbuildSettings + .WithRestore() .WithTarget("rebuild") .WithProperty("DisableEmbeddedXbf", "false") - .WithProperty("EnableTypeInfoReflection", "false")); + .WithProperty("EnableTypeInfoReflection", "false") + .WithProperty("UwpMinTargetFrameworks", "uap10.0.14393;uap10.0.16299")); msbuildSettings = GetMSBuildSettings(); msbuildSettings.BinaryLogger = binaryLogger; From fd2477b45b4de5336c78447972419ec7d420cea3 Mon Sep 17 00:00:00 2001 From: Shane Neuville Date: Thu, 12 Nov 2020 16:41:46 -0600 Subject: [PATCH 2/4] Update build.cake --- build.cake | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/build.cake b/build.cake index 522b59c9745..be60a99bc05 100644 --- a/build.cake +++ b/build.cake @@ -815,7 +815,18 @@ Task("BuildForNuget") .WithTarget("rebuild") .WithProperty("DisableEmbeddedXbf", "false") .WithProperty("EnableTypeInfoReflection", "false") - .WithProperty("UwpMinTargetFrameworks", "uap10.0.14393;uap10.0.16299")); + .WithProperty("UwpMinTargetFrameworks", "uap10.0.16299")); + + msbuildSettings = GetMSBuildSettings(); + msbuildSettings.BinaryLogger = binaryLogger; + binaryLogger.FileName = $"{artifactStagingDirectory}/win-{configuration}-csproj.binlog"; + MSBuild("./Xamarin.Forms.Platform.UAP/Xamarin.Forms.Platform.UAP.csproj", + msbuildSettings + .WithRestore() + .WithTarget("rebuild") + .WithProperty("DisableEmbeddedXbf", "false") + .WithProperty("EnableTypeInfoReflection", "false") + .WithProperty("UwpMinTargetFrameworks", "uap10.0.14393")); msbuildSettings = GetMSBuildSettings(); msbuildSettings.BinaryLogger = binaryLogger; @@ -1196,4 +1207,4 @@ public void SetEnvironmentVariable(string key, string value, ICakeContext contex { System.Environment.SetEnvironmentVariable(key, value); } -} \ No newline at end of file +} From 8ff7fa1ced3aed24f1584dcc9221ef714b3304ad Mon Sep 17 00:00:00 2001 From: Shane Neuville Date: Thu, 12 Nov 2020 16:42:36 -0600 Subject: [PATCH 3/4] Update build.cake --- build.cake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.cake b/build.cake index be60a99bc05..0165e5047c5 100644 --- a/build.cake +++ b/build.cake @@ -808,7 +808,7 @@ Task("BuildForNuget") msbuildSettings = GetMSBuildSettings(); msbuildSettings.BinaryLogger = binaryLogger; - binaryLogger.FileName = $"{artifactStagingDirectory}/win-{configuration}-csproj.binlog"; + binaryLogger.FileName = $"{artifactStagingDirectory}/win-16299-{configuration}-csproj.binlog"; MSBuild("./Xamarin.Forms.Platform.UAP/Xamarin.Forms.Platform.UAP.csproj", msbuildSettings .WithRestore() @@ -819,7 +819,7 @@ Task("BuildForNuget") msbuildSettings = GetMSBuildSettings(); msbuildSettings.BinaryLogger = binaryLogger; - binaryLogger.FileName = $"{artifactStagingDirectory}/win-{configuration}-csproj.binlog"; + binaryLogger.FileName = $"{artifactStagingDirectory}/win-14393-{configuration}-csproj.binlog"; MSBuild("./Xamarin.Forms.Platform.UAP/Xamarin.Forms.Platform.UAP.csproj", msbuildSettings .WithRestore() From 99166ec9fdea71ee51cfa8f17d23a6ce38760e29 Mon Sep 17 00:00:00 2001 From: Shane Neuville Date: Thu, 12 Nov 2020 20:45:09 -0600 Subject: [PATCH 4/4] - additional unit test fixes --- .../Issue4597.cs | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue4597.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue4597.cs index 45ca4cf138e..16812d73508 100644 --- a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue4597.cs +++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue4597.cs @@ -1,11 +1,11 @@ using System; using System.Collections.Generic; using System.Collections.ObjectModel; +using System.Linq; using System.Text; +using System.Threading; using Xamarin.Forms.CustomAttributes; using Xamarin.Forms.Internals; -using System.Linq; -using System.Threading; #if UITEST using Xamarin.UITest; @@ -103,7 +103,7 @@ protected override void Init() IsToggled = false, HeightRequest = 60 }; - var sourceLabel = new Label { Text = _imageFromFile }; + var sourceLabel = new Label { Text = _imageFromFile, AutomationId = "SourceLabel" }; switchToUri.Toggled += (_, e) => { @@ -176,42 +176,42 @@ protected override void Init() [Test] public void ImageFromFileSourceAppearsAndDisappearsCorrectly() { - RunTest(nameof(Image), false); + RunTest(nameof(Image), true); } [Test] [NUnit.Framework.Category(UITestCategories.RequiresInternetConnection)] public void ImageFromUriSourceAppearsAndDisappearsCorrectly() { - RunTest(nameof(Image), true); + RunTest(nameof(Image), false); } [Test] public void ButtonFromFileSourceAppearsAndDisappearsCorrectly() { - RunTest(nameof(Button), false); + RunTest(nameof(Button), true); } [Test] [NUnit.Framework.Category(UITestCategories.RequiresInternetConnection)] public void ButtonFromUriSourceAppearsAndDisappearsCorrectly() { - RunTest(nameof(Button), true); + RunTest(nameof(Button), false); } [Test] public void ImageButtonFromFileSourceAppearsAndDisappearsCorrectly() { - RunTest(nameof(ImageButton), false); + RunTest(nameof(ImageButton), true); } [Test] [NUnit.Framework.Category(UITestCategories.RequiresInternetConnection)] public void ImageButtonFromUriSourceAppearsAndDisappearsCorrectly() { - RunTest(nameof(ImageButton), true); + RunTest(nameof(ImageButton), false); } [Test] @@ -306,9 +306,10 @@ void SetupTest(string controlType, bool fileSource) RunningApp.WaitForNoElement(activeTest); } - if (fileSource && RunningApp.Query(_imageFromFile).Length == 0) + string sourceLabel = RunningApp.WaitForFirstElement("SourceLabel").ReadText(); + if (fileSource && sourceLabel != _imageFromFile) RunningApp.Tap(_switchUriId); - else if (!fileSource && RunningApp.Query(_imageFromUri).Length == 0) + else if (!fileSource && sourceLabel != _imageFromUri) RunningApp.Tap(_switchUriId); } #endif