Implement milestone 2 route navigation
This commit is contained in:
@@ -40,4 +40,20 @@ public sealed class FrontendHostTests(WebApplicationFactory<Program> factory) :
|
||||
Assert.Contains("data-auth-page", html);
|
||||
Assert.DoesNotContain("_framework/blazor.web.js", html);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("/play")]
|
||||
[InlineData("/campaigns")]
|
||||
[InlineData("/admin")]
|
||||
public async Task AuthenticatedRoutes_ServeInteractiveShell(string path)
|
||||
{
|
||||
using var factory = CreateFactory(1);
|
||||
using var client = factory.CreateClient(new() { AllowAutoRedirect = false });
|
||||
var response = await client.GetAsync(path);
|
||||
|
||||
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
|
||||
var html = await response.Content.ReadAsStringAsync();
|
||||
Assert.Contains("_framework/blazor.web.js", html);
|
||||
Assert.DoesNotContain("data-auth-page", html);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user