Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enable Blazor AoT tests #31941

Merged
merged 1 commit into from
Apr 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ public class WasmAoTPublishIntegrationTest : WasmPublishIntegrationTestBase
{
public WasmAoTPublishIntegrationTest(ITestOutputHelper log) : base(log) { }

[Fact(Skip = "https://github.com/dotnet/sdk/issues/31491")]
[Fact]
public void AoT_Publish_InRelease_Works()
{
// Arrange
var testAppName = "BlazorWasmWithLibrary";
var testInstance = CreateAspNetSdkTestAssetWithAot(testAppName, new [] { "blazorwasm" });
var testInstance = CreateAspNetSdkTestAssetWithAot(testAppName, new[] { "blazorwasm" });
File.WriteAllText(Path.Combine(testInstance.TestRoot, "blazorwasm", "App.razor.css"), "h1 { font-size: 16px; }");

var publishCommand = new PublishCommand(testInstance, "blazorwasm");
Expand Down Expand Up @@ -58,12 +58,12 @@ public void AoT_Publish_InRelease_Works()
new FileInfo(Path.Combine(blazorPublishDirectory, "css", "app.css")).Should().Contain(".publish");
}

[Fact(Skip = "https://github.com/dotnet/sdk/issues/31491")]
[Fact]
public void AoT_Publish_WithExistingWebConfig_Works()
{
// Arrange
var testAppName = "BlazorWasmWithLibrary";
var testInstance = CreateAspNetSdkTestAssetWithAot(testAppName, new [] { "blazorwasm" });
var testInstance = CreateAspNetSdkTestAssetWithAot(testAppName, new[] { "blazorwasm" });

var webConfigContents = "test webconfig contents";
File.WriteAllText(Path.Combine(testInstance.TestRoot, "blazorwasm", "web.config"), webConfigContents);
Expand All @@ -80,12 +80,12 @@ public void AoT_Publish_WithExistingWebConfig_Works()
webConfig.Should().Contain(webConfigContents);
}

[Fact(Skip = "https://github.com/dotnet/sdk/issues/31491")]
[Fact]
public void AoT_Publish_HostedAppWithScopedCss_VisualStudio()
{
// Simulates publishing the same way VS does by setting BuildProjectReferences=false.
var testAppName = "BlazorHosted";
var testInstance = CreateAspNetSdkTestAssetWithAot(testAppName, new [] { "blazorwasm", "blazorhosted" });
var testInstance = CreateAspNetSdkTestAssetWithAot(testAppName, new[] { "blazorwasm", "blazorhosted" });
File.WriteAllText(Path.Combine(testInstance.TestRoot, "blazorwasm", "App.razor.css"), "h1 { font-size: 16px; }");

// VS builds projects individually and then a publish with BuildDependencies=false, but building the main project is a close enough approximation for this test.
Expand Down