"Test-Infrastructure-v2.5.0-Coverage-Improvement"
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user