Skip to content

Commit 18afb0e

Browse files
committed
Fix tests
1 parent c1fdfeb commit 18afb0e

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/Components/Blazor/testassets/HostedInAspNet.Server/Program.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ public static IHost BuildWebHost(string[] args) =>
1717
Host.CreateDefaultBuilder(args)
1818
.ConfigureWebHostDefaults(webHostBuilder =>
1919
{
20+
// We require this line because we run in Production environment
21+
// and static web assets are only on by default during development.
22+
webHostBuilder.UseStaticWebAssets();
23+
2024
webHostBuilder.UseStartup<Startup>();
2125
})
2226
.Build();

src/Components/test/E2ETest/Tests/BootResourceCachingTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public BootResourceCachingTest(
2929
ITestOutputHelper output)
3030
: base(browserFixture, serverFixture, output)
3131
{
32-
serverFixture.BuildWebHostMethod = HostedInAspNet.Server.Program.BuildWebHost;
32+
serverFixture.BuildWebHostMethod = Program.BuildWebHost;
3333
}
3434

3535
public override Task InitializeAsync()
@@ -57,7 +57,7 @@ public void CachesResourcesAfterFirstLoad()
5757
var subsequentResourcesRequested = GetAndClearRequestedPaths();
5858
Assert.NotEmpty(initialResourcesRequested.Where(path => path.EndsWith("/blazor.boot.json")));
5959
Assert.Empty(subsequentResourcesRequested.Where(path => path.EndsWith("/dotnet.wasm")));
60-
Assert.NotEmpty(subsequentResourcesRequested.Where(path => path.EndsWith(".js")));
60+
Assert.Empty(subsequentResourcesRequested.Where(path => path.EndsWith(".js")));
6161
Assert.Empty(subsequentResourcesRequested.Where(path => path.EndsWith(".dll")));
6262
}
6363

0 commit comments

Comments
 (0)