From b12a3134e04d44b80bbc51bd25ca174fae372e37 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Mon, 28 Sep 2020 11:14:00 -0700 Subject: [PATCH 01/18] Checkpoint --- .../BlazorTemplates.Tests/BlazorWasmTemplateTest.cs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/ProjectTemplates/BlazorTemplates.Tests/BlazorWasmTemplateTest.cs b/src/ProjectTemplates/BlazorTemplates.Tests/BlazorWasmTemplateTest.cs index fa4c091d5400..c775b4f05f44 100644 --- a/src/ProjectTemplates/BlazorTemplates.Tests/BlazorWasmTemplateTest.cs +++ b/src/ProjectTemplates/BlazorTemplates.Tests/BlazorWasmTemplateTest.cs @@ -80,7 +80,6 @@ public async Task BlazorWasmStandaloneTemplate_Works() } [Fact] - [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/20172")] public async Task BlazorWasmHostedTemplate_Works() { // Additional arguments are needed. See: https://github.com/dotnet/aspnetcore/issues/24278 @@ -137,7 +136,6 @@ private static async Task AssertCompressionFormat(AspNetProcess aspNetProcess, s } [Fact] - [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/23992")] public async Task BlazorWasmStandalonePwaTemplate_Works() { // Additional arguments are needed. See: https://github.com/dotnet/aspnetcore/issues/24278 @@ -262,7 +260,6 @@ private void ValidateAppWorksOffline(Project project, string listeningUri, bool } [ConditionalFact] - [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/23992")] // LocalDB doesn't work on non Windows platforms [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] public Task BlazorWasmHostedTemplate_IndividualAuth_Works_WithLocalDB() @@ -271,7 +268,6 @@ public Task BlazorWasmHostedTemplate_IndividualAuth_Works_WithLocalDB() } [Fact] - [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/23992")] public Task BlazorWasmHostedTemplate_IndividualAuth_Works_WithOutLocalDB() { return BlazorWasmHostedTemplate_IndividualAuth_Works(false); @@ -346,7 +342,6 @@ private async Task BlazorWasmHostedTemplate_IndividualAuth_Works(bool useLocalDb } [Fact] - [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/23639")] public async Task BlazorWasmStandaloneTemplate_IndividualAuth_Works() { // Additional arguments are needed. See: https://github.com/dotnet/aspnetcore/issues/24278 From d1205fc94d16fb24fc5064c185cc9fd1a4edef87 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Mon, 28 Sep 2020 11:14:46 -0700 Subject: [PATCH 02/18] Checkpoint --- .../BlazorTemplates.Tests/BlazorServerTemplateTest.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/ProjectTemplates/BlazorTemplates.Tests/BlazorServerTemplateTest.cs b/src/ProjectTemplates/BlazorTemplates.Tests/BlazorServerTemplateTest.cs index 7a47f9b84acf..be93bed6a56f 100644 --- a/src/ProjectTemplates/BlazorTemplates.Tests/BlazorServerTemplateTest.cs +++ b/src/ProjectTemplates/BlazorTemplates.Tests/BlazorServerTemplateTest.cs @@ -27,7 +27,6 @@ public BlazorServerTemplateTest(ProjectFactoryFixture projectFactory, BrowserFix public Project Project { get; private set; } [Fact] - [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/20172")] public async Task BlazorServerTemplateWorks_NoAuth() { // Additional arguments are needed. See: https://github.com/dotnet/aspnetcore/issues/24278 @@ -88,7 +87,6 @@ public async Task BlazorServerTemplateWorks_NoAuth() [Theory] [InlineData(true)] [InlineData(false)] - [QuarantinedTest] public async Task BlazorServerTemplateWorks_IndividualAuth(bool useLocalDB) { // Additional arguments are needed. See: https://github.com/dotnet/aspnetcore/issues/24278 @@ -190,7 +188,6 @@ private void TestBasicNavigation() } [Theory] - [QuarantinedTest] [InlineData("IndividualB2C", null)] [InlineData("IndividualB2C", new string[] { "--called-api-url \"https://graph.microsoft.com\"", "--called-api-scopes user.readwrite" })] [InlineData("SingleOrg", null)] From eb1df390c4d4faaff9219a18f2ecd1104be78e90 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Mon, 28 Sep 2020 13:58:35 -0700 Subject: [PATCH 03/18] Why no run? --- .../BlazorTemplates.Tests/BlazorTemplates.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ProjectTemplates/BlazorTemplates.Tests/BlazorTemplates.Tests.csproj b/src/ProjectTemplates/BlazorTemplates.Tests/BlazorTemplates.Tests.csproj index 2da0e11666ef..22c154ec36f0 100644 --- a/src/ProjectTemplates/BlazorTemplates.Tests/BlazorTemplates.Tests.csproj +++ b/src/ProjectTemplates/BlazorTemplates.Tests/BlazorTemplates.Tests.csproj @@ -9,7 +9,7 @@ $(DefineConstants);XPLAT true - true + false true From e224b4b1047e5c82eadd5896abfd9cf087fc908d Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Tue, 29 Sep 2020 02:40:18 -0700 Subject: [PATCH 04/18] Turn on bin log for templates test --- .azure/pipelines/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure/pipelines/ci.yml b/.azure/pipelines/ci.yml index 2591d8271ed4..99118db45b9b 100644 --- a/.azure/pipelines/ci.yml +++ b/.azure/pipelines/ci.yml @@ -622,7 +622,7 @@ stages: displayName: Build Repo - script: ./src/ProjectTemplates/build.cmd -ci -nobl -noBuildRepoTasks -pack -NoRestore -noBuildNative -NoBuilddeps "/p:RunTemplateTests=true" displayName: Pack Templates - - script: ./src/ProjectTemplates/build.cmd -ci -nobl -noBuildRepoTasks -test -NoRestore -NoBuild -NoBuilddeps "/p:RunTemplateTests=true" + - script: ./src/ProjectTemplates/build.cmd -ci -noBuildRepoTasks -test -NoRestore -NoBuild -NoBuilddeps "/p:RunTemplateTests=true" /bl:artifacts/log/Templates.Test.binlog displayName: Test Templates artifacts: - name: Windows_Test_Templates_Dumps From ea39f9f943af124392010dba6aaec385e19f5a9d Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Mon, 5 Oct 2020 09:07:42 -0700 Subject: [PATCH 05/18] Reenable tests --- src/Shared/E2ETesting/E2ETesting.props | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/Shared/E2ETesting/E2ETesting.props b/src/Shared/E2ETesting/E2ETesting.props index d1a34ae47454..f7da557009e7 100644 --- a/src/Shared/E2ETesting/E2ETesting.props +++ b/src/Shared/E2ETesting/E2ETesting.props @@ -21,9 +21,6 @@ false - - - true From 186bb09f644b74e0ad979b13ea4699b40f4899c5 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Mon, 5 Oct 2020 09:08:20 -0700 Subject: [PATCH 06/18] Update BlazorTemplates.Tests.csproj --- .../BlazorTemplates.Tests/BlazorTemplates.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ProjectTemplates/BlazorTemplates.Tests/BlazorTemplates.Tests.csproj b/src/ProjectTemplates/BlazorTemplates.Tests/BlazorTemplates.Tests.csproj index 22c154ec36f0..2da0e11666ef 100644 --- a/src/ProjectTemplates/BlazorTemplates.Tests/BlazorTemplates.Tests.csproj +++ b/src/ProjectTemplates/BlazorTemplates.Tests/BlazorTemplates.Tests.csproj @@ -9,7 +9,7 @@ $(DefineConstants);XPLAT true - + true false true From d5ca02b8bb50f8f777b8f3996ca33b1ecee37c8e Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Mon, 5 Oct 2020 09:08:38 -0700 Subject: [PATCH 07/18] Update ci.yml --- .azure/pipelines/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure/pipelines/ci.yml b/.azure/pipelines/ci.yml index 99118db45b9b..711cc685787e 100644 --- a/.azure/pipelines/ci.yml +++ b/.azure/pipelines/ci.yml @@ -622,7 +622,7 @@ stages: displayName: Build Repo - script: ./src/ProjectTemplates/build.cmd -ci -nobl -noBuildRepoTasks -pack -NoRestore -noBuildNative -NoBuilddeps "/p:RunTemplateTests=true" displayName: Pack Templates - - script: ./src/ProjectTemplates/build.cmd -ci -noBuildRepoTasks -test -NoRestore -NoBuild -NoBuilddeps "/p:RunTemplateTests=true" /bl:artifacts/log/Templates.Test.binlog + - script: ./src/ProjectTemplates/build.cmd -ci -noBuildRepoTasks -test -NoRestore -NoBuild -NoBuilddeps "/p:RunTemplateTests=true" displayName: Test Templates artifacts: - name: Windows_Test_Templates_Dumps From 6a712490c2c2aaea6d36a6c8622d2316f3673cf0 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Mon, 5 Oct 2020 09:09:05 -0700 Subject: [PATCH 08/18] Update ci.yml --- .azure/pipelines/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure/pipelines/ci.yml b/.azure/pipelines/ci.yml index 711cc685787e..2591d8271ed4 100644 --- a/.azure/pipelines/ci.yml +++ b/.azure/pipelines/ci.yml @@ -622,7 +622,7 @@ stages: displayName: Build Repo - script: ./src/ProjectTemplates/build.cmd -ci -nobl -noBuildRepoTasks -pack -NoRestore -noBuildNative -NoBuilddeps "/p:RunTemplateTests=true" displayName: Pack Templates - - script: ./src/ProjectTemplates/build.cmd -ci -noBuildRepoTasks -test -NoRestore -NoBuild -NoBuilddeps "/p:RunTemplateTests=true" + - script: ./src/ProjectTemplates/build.cmd -ci -nobl -noBuildRepoTasks -test -NoRestore -NoBuild -NoBuilddeps "/p:RunTemplateTests=true" displayName: Test Templates artifacts: - name: Windows_Test_Templates_Dumps From eab9bd07f95a844850c502a618b8fdfb7ab84f62 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Mon, 5 Oct 2020 13:34:01 -0700 Subject: [PATCH 09/18] Update BlazorWasmTemplateTest.cs --- .../BlazorTemplates.Tests/BlazorWasmTemplateTest.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ProjectTemplates/BlazorTemplates.Tests/BlazorWasmTemplateTest.cs b/src/ProjectTemplates/BlazorTemplates.Tests/BlazorWasmTemplateTest.cs index c775b4f05f44..0aaf05a96088 100644 --- a/src/ProjectTemplates/BlazorTemplates.Tests/BlazorWasmTemplateTest.cs +++ b/src/ProjectTemplates/BlazorTemplates.Tests/BlazorWasmTemplateTest.cs @@ -80,6 +80,7 @@ public async Task BlazorWasmStandaloneTemplate_Works() } [Fact] + [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/20172")] public async Task BlazorWasmHostedTemplate_Works() { // Additional arguments are needed. See: https://github.com/dotnet/aspnetcore/issues/24278 From 346e06e27e141c801034d9bd4db8dfd110265e56 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Mon, 5 Oct 2020 13:38:13 -0700 Subject: [PATCH 10/18] Update BlazorServerTemplateTest.cs --- .../BlazorTemplates.Tests/BlazorServerTemplateTest.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ProjectTemplates/BlazorTemplates.Tests/BlazorServerTemplateTest.cs b/src/ProjectTemplates/BlazorTemplates.Tests/BlazorServerTemplateTest.cs index be93bed6a56f..9132ac9b0473 100644 --- a/src/ProjectTemplates/BlazorTemplates.Tests/BlazorServerTemplateTest.cs +++ b/src/ProjectTemplates/BlazorTemplates.Tests/BlazorServerTemplateTest.cs @@ -27,6 +27,7 @@ public BlazorServerTemplateTest(ProjectFactoryFixture projectFactory, BrowserFix public Project Project { get; private set; } [Fact] + [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/20172")] public async Task BlazorServerTemplateWorks_NoAuth() { // Additional arguments are needed. See: https://github.com/dotnet/aspnetcore/issues/24278 @@ -87,6 +88,7 @@ public async Task BlazorServerTemplateWorks_NoAuth() [Theory] [InlineData(true)] [InlineData(false)] + [QuarantinedTest] public async Task BlazorServerTemplateWorks_IndividualAuth(bool useLocalDB) { // Additional arguments are needed. See: https://github.com/dotnet/aspnetcore/issues/24278 From bd2fd72201b6ed1f336d16900d8ee0dc50c33307 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Mon, 5 Oct 2020 13:39:02 -0700 Subject: [PATCH 11/18] Update BlazorWasmTemplateTest.cs --- .../BlazorTemplates.Tests/BlazorWasmTemplateTest.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ProjectTemplates/BlazorTemplates.Tests/BlazorWasmTemplateTest.cs b/src/ProjectTemplates/BlazorTemplates.Tests/BlazorWasmTemplateTest.cs index 0aaf05a96088..ce7ce3aa5503 100644 --- a/src/ProjectTemplates/BlazorTemplates.Tests/BlazorWasmTemplateTest.cs +++ b/src/ProjectTemplates/BlazorTemplates.Tests/BlazorWasmTemplateTest.cs @@ -137,6 +137,7 @@ private static async Task AssertCompressionFormat(AspNetProcess aspNetProcess, s } [Fact] + [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/23992")] public async Task BlazorWasmStandalonePwaTemplate_Works() { // Additional arguments are needed. See: https://github.com/dotnet/aspnetcore/issues/24278 From 10e6da0f81e94e90f1e9070668036103e8e8f33b Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Wed, 14 Oct 2020 02:58:42 -0700 Subject: [PATCH 12/18] Try swallow webdriver exceptions for storage cleanup --- .../BlazorTemplates.Tests/BlazorWasmTemplateTest.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ProjectTemplates/BlazorTemplates.Tests/BlazorWasmTemplateTest.cs b/src/ProjectTemplates/BlazorTemplates.Tests/BlazorWasmTemplateTest.cs index ce7ce3aa5503..f944ec8d3a83 100644 --- a/src/ProjectTemplates/BlazorTemplates.Tests/BlazorWasmTemplateTest.cs +++ b/src/ProjectTemplates/BlazorTemplates.Tests/BlazorWasmTemplateTest.cs @@ -510,8 +510,11 @@ private void TestBasicNavigation(string appName, bool usesAuth = false, bool ski // Start fresh always if (usesAuth) { - Browser.ExecuteJavaScript("sessionStorage.clear()"); - Browser.ExecuteJavaScript("localStorage.clear()"); + try + { + Browser.ExecuteJavaScript("sessionStorage.clear()"); + Browser.ExecuteJavaScript("localStorage.clear()"); + } catch (WebDriverException) { } // 3rd party cookies disabled will result in this error. Browser.Manage().Cookies.DeleteAllCookies(); Browser.Navigate().Refresh(); } From b89b9d20f71b07b1ec418a7b627d11713cb7e121 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Wed, 14 Oct 2020 09:52:55 -0700 Subject: [PATCH 13/18] Try cleaning up certs --- src/ProjectTemplates/Shared/AspNetProcess.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ProjectTemplates/Shared/AspNetProcess.cs b/src/ProjectTemplates/Shared/AspNetProcess.cs index 13a9281c5620..9df8694d19db 100644 --- a/src/ProjectTemplates/Shared/AspNetProcess.cs +++ b/src/ProjectTemplates/Shared/AspNetProcess.cs @@ -45,6 +45,7 @@ public AspNetProcess( bool usePublishedAppHost = false, ILogger logger = null) { + var manager = CertificateManager.Instance.CleanupHttpsCertificates(); _developmentCertificate = DevelopmentCertificate.Create(workingDirectory); _output = output; From e598da65caebec4f702109187f99d74a818938c9 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Wed, 14 Oct 2020 10:12:20 -0700 Subject: [PATCH 14/18] Update AspNetProcess.cs --- src/ProjectTemplates/Shared/AspNetProcess.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ProjectTemplates/Shared/AspNetProcess.cs b/src/ProjectTemplates/Shared/AspNetProcess.cs index 9df8694d19db..a1514600f2bd 100644 --- a/src/ProjectTemplates/Shared/AspNetProcess.cs +++ b/src/ProjectTemplates/Shared/AspNetProcess.cs @@ -12,6 +12,7 @@ using System.Threading.Tasks; using AngleSharp.Dom.Html; using AngleSharp.Parser.Html; +using Microsoft.AspNetCore.Certificates.Generation; using Microsoft.AspNetCore.Internal; using Microsoft.AspNetCore.Server.IntegrationTesting; using Microsoft.Extensions.CommandLineUtils; From 10d32f6a36b5556678b71e109d6c6e982a30f884 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Wed, 14 Oct 2020 10:13:01 -0700 Subject: [PATCH 15/18] Update BlazorWasmTemplateTest.cs --- .../BlazorTemplates.Tests/BlazorWasmTemplateTest.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/ProjectTemplates/BlazorTemplates.Tests/BlazorWasmTemplateTest.cs b/src/ProjectTemplates/BlazorTemplates.Tests/BlazorWasmTemplateTest.cs index f944ec8d3a83..ce7ce3aa5503 100644 --- a/src/ProjectTemplates/BlazorTemplates.Tests/BlazorWasmTemplateTest.cs +++ b/src/ProjectTemplates/BlazorTemplates.Tests/BlazorWasmTemplateTest.cs @@ -510,11 +510,8 @@ private void TestBasicNavigation(string appName, bool usesAuth = false, bool ski // Start fresh always if (usesAuth) { - try - { - Browser.ExecuteJavaScript("sessionStorage.clear()"); - Browser.ExecuteJavaScript("localStorage.clear()"); - } catch (WebDriverException) { } // 3rd party cookies disabled will result in this error. + Browser.ExecuteJavaScript("sessionStorage.clear()"); + Browser.ExecuteJavaScript("localStorage.clear()"); Browser.Manage().Cookies.DeleteAllCookies(); Browser.Navigate().Refresh(); } From 7b68a26eed2b9df361d302c40290406581e3c027 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Wed, 14 Oct 2020 13:22:23 -0700 Subject: [PATCH 16/18] Update AspNetProcess.cs --- src/ProjectTemplates/Shared/AspNetProcess.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ProjectTemplates/Shared/AspNetProcess.cs b/src/ProjectTemplates/Shared/AspNetProcess.cs index a1514600f2bd..61746bcce4fe 100644 --- a/src/ProjectTemplates/Shared/AspNetProcess.cs +++ b/src/ProjectTemplates/Shared/AspNetProcess.cs @@ -46,7 +46,7 @@ public AspNetProcess( bool usePublishedAppHost = false, ILogger logger = null) { - var manager = CertificateManager.Instance.CleanupHttpsCertificates(); + CertificateManager.Instance.CleanupHttpsCertificates(); _developmentCertificate = DevelopmentCertificate.Create(workingDirectory); _output = output; From d0862b41915b6a6efaa5515f850869112722b37f Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Wed, 14 Oct 2020 16:13:48 -0700 Subject: [PATCH 17/18] Try disabling parallelization --- .../BlazorTemplates.Tests/AssemblyInfo.AssemblyFixtures.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ProjectTemplates/BlazorTemplates.Tests/AssemblyInfo.AssemblyFixtures.cs b/src/ProjectTemplates/BlazorTemplates.Tests/AssemblyInfo.AssemblyFixtures.cs index 57f163b513fd..b3356c6f9205 100644 --- a/src/ProjectTemplates/BlazorTemplates.Tests/AssemblyInfo.AssemblyFixtures.cs +++ b/src/ProjectTemplates/BlazorTemplates.Tests/AssemblyInfo.AssemblyFixtures.cs @@ -9,4 +9,5 @@ [assembly: Microsoft.AspNetCore.E2ETesting.AssemblyFixture(typeof(ProjectFactoryFixture))] [assembly: Microsoft.AspNetCore.E2ETesting.AssemblyFixture(typeof(SeleniumStandaloneServer))] +[assembly: CollectionBehavior(DisableTestParallelization = true)] From bb4a224f42bf528c1895a7a9eb13f385d0138e0d Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Thu, 15 Oct 2020 02:39:25 -0700 Subject: [PATCH 18/18] Update AssemblyInfo.AssemblyFixtures.cs --- .../BlazorTemplates.Tests/AssemblyInfo.AssemblyFixtures.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ProjectTemplates/BlazorTemplates.Tests/AssemblyInfo.AssemblyFixtures.cs b/src/ProjectTemplates/BlazorTemplates.Tests/AssemblyInfo.AssemblyFixtures.cs index 28a3191da2ea..04e9c014b1b6 100644 --- a/src/ProjectTemplates/BlazorTemplates.Tests/AssemblyInfo.AssemblyFixtures.cs +++ b/src/ProjectTemplates/BlazorTemplates.Tests/AssemblyInfo.AssemblyFixtures.cs @@ -4,8 +4,8 @@ using Microsoft.AspNetCore.E2ETesting; using Microsoft.AspNetCore.Testing; using Templates.Test.Helpers; +using Xunit; [assembly: AssemblyFixture(typeof(ProjectFactoryFixture))] [assembly: AssemblyFixture(typeof(SeleniumStandaloneServer))] [assembly: CollectionBehavior(DisableTestParallelization = true)] -