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
This commit is contained in:
Pranav K 2020-08-20 10:14:53 -07:00 committed by GitHub
parent 3c34c3ab0d
commit 4f64c65325
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -36,6 +36,8 @@
<Compile Include="..\src\BootJsonData.cs" LinkBase="Wasm" />
<Compile Include="..\src\AssetsManifestFile.cs" LinkBase="Wasm" />
<Compile Include="$(SharedSourceRoot)CommandLineUtils\**\*.cs" />
<EmbeddedResource Include="..\src\targets\BlazorWasm.web.config" />
</ItemGroup>
<Target Name="GenerateTestData" BeforeTargets="GetAssemblyAttributes">

View File

@ -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);