From 4f64c653254b8ba53d1b8567abe42669fdbcfbc0 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Thu, 20 Aug 2020 10:14:53 -0700 Subject: [PATCH] Add a regression test for web.config transform (#25056) This was resolved as part of moving to the WebAssembly SDK. A test that would have helped us catch this sooner. This change addresses the test gap. Resolves https://github.com/dotnet/aspnetcore/issues/24568 --- .../Microsoft.NET.Sdk.BlazorWebAssembly.IntegrationTests.csproj | 2 ++ .../Sdk/integrationtests/WasmPublishIntegrationTest.cs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/Components/WebAssembly/Sdk/integrationtests/Microsoft.NET.Sdk.BlazorWebAssembly.IntegrationTests.csproj b/src/Components/WebAssembly/Sdk/integrationtests/Microsoft.NET.Sdk.BlazorWebAssembly.IntegrationTests.csproj index 27241a81b4..e8b9756812 100644 --- a/src/Components/WebAssembly/Sdk/integrationtests/Microsoft.NET.Sdk.BlazorWebAssembly.IntegrationTests.csproj +++ b/src/Components/WebAssembly/Sdk/integrationtests/Microsoft.NET.Sdk.BlazorWebAssembly.IntegrationTests.csproj @@ -36,6 +36,8 @@ + + diff --git a/src/Components/WebAssembly/Sdk/integrationtests/WasmPublishIntegrationTest.cs b/src/Components/WebAssembly/Sdk/integrationtests/WasmPublishIntegrationTest.cs index f822ab49c2..f71f5a9d31 100644 --- a/src/Components/WebAssembly/Sdk/integrationtests/WasmPublishIntegrationTest.cs +++ b/src/Components/WebAssembly/Sdk/integrationtests/WasmPublishIntegrationTest.cs @@ -41,6 +41,8 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests // Verify web.config Assert.FileExists(result, publishDirectory, "web.config"); + var webConfigContent = new StreamReader(GetType().Assembly.GetManifestResourceStream("Microsoft.NET.Sdk.BlazorWebAssembly.IntegrationTests.BlazorWasm.web.config")).ReadToEnd(); + Assert.FileContentEquals(result, Path.Combine(publishDirectory, "web.config"), webConfigContent); Assert.FileCountEquals(result, 1, publishDirectory, "*", SearchOption.TopDirectoryOnly); VerifyBootManifestHashes(result, blazorPublishDirectory);