"Test-Infrastructure-v2.5.0-Coverage-Improvement"

This commit is contained in:
sysadmin
2025-09-29 09:05:58 +01:00
parent c5c56ec3d8
commit f5e87d8b6b
2 changed files with 203 additions and 1 deletions

View File

@@ -18,7 +18,10 @@ public class AdminPanelTests : IClassFixture<TestWebApplicationFactory>, IAsyncL
public AdminPanelTests(TestWebApplicationFactory factory)
{
_factory = factory;
_baseUrl = _factory.Server.BaseAddress.ToString().TrimEnd('/'); // Use the test server's URL
// Create a client to ensure the server is started and get the proper URL
var client = _factory.CreateClient();
_baseUrl = client.BaseAddress?.ToString().TrimEnd('/') ?? "http://localhost:5000";
client.Dispose();
}
public async Task InitializeAsync()