Files
Heimdall/tests/Heimdall.E2E.Tests/Pages/PageRenderTests.cs
T
arnaud.dartois 2bf3dbc95b
Heimdall Gitea / Detect CI scope (pull_request) Successful in 5s
Heimdall Gitea / Build and tests (pull_request) Successful in 20m8s
Heimdall Gitea / Publish versioned release (pull_request) Skipped
Heimdall Gitea / Build and scan agent image (pull_request) Failing after 6m10s
Heimdall Gitea / Build and scan server image (pull_request) Failing after 8m2s
Heimdall Gitea / Publish Docker Hub latest tags (pull_request) Skipped
Heimdall Gitea / CI policy (pull_request) Failing after 2s
fix(identity): harden user lifecycle and permissions
2026-11-04 10:26:07 +01:00

110 lines
3.2 KiB
C#

using Heimdall.TestCommon;
using Microsoft.Playwright;
using Shouldly;
namespace Heimdall.E2E.Tests.Pages;
[Collection("E2E")]
public class PageRenderTests : E2ETestBase
{
public PageRenderTests(PostgreSqlContainerFixture postgres) : base(postgres) { }
[Fact]
public async Task Sites_page_renders()
{
try
{
await Page.GotoAsync($"{BaseUrl}/sites", new PageGotoOptions { WaitUntil = WaitUntilState.DOMContentLoaded, Timeout = 15000 });
}
catch { /* Protected page may redirect on auth failure */ }
await Task.Delay(3000);
var body = Page.Locator("body");
var text = await body.TextContentAsync();
text.ShouldNotBeNull();
}
[Fact]
public async Task Events_page_renders()
{
try
{
await Page.GotoAsync($"{BaseUrl}/events", new PageGotoOptions { WaitUntil = WaitUntilState.DOMContentLoaded, Timeout = 15000 });
}
catch { }
await Task.Delay(3000);
var body = Page.Locator("body");
var text = await body.TextContentAsync();
text.ShouldNotBeNull();
}
[Fact]
public async Task Profile_page_renders()
{
try
{
await Page.GotoAsync($"{BaseUrl}/profile", new PageGotoOptions { WaitUntil = WaitUntilState.DOMContentLoaded, Timeout = 15000 });
}
catch { }
await Task.Delay(3000);
var body = Page.Locator("body");
var text = await body.TextContentAsync();
text.ShouldNotBeNull();
}
[Fact]
public async Task Settings_page_renders()
{
try
{
await Page.GotoAsync($"{BaseUrl}/settings", new PageGotoOptions { WaitUntil = WaitUntilState.DOMContentLoaded, Timeout = 15000 });
}
catch { }
await Task.Delay(3000);
var body = Page.Locator("body");
var text = await body.TextContentAsync();
text.ShouldNotBeNull();
}
[Fact]
public async Task Admin_groups_page_renders()
{
try
{
await Page.GotoAsync($"{BaseUrl}/admin/groups", new PageGotoOptions { WaitUntil = WaitUntilState.DOMContentLoaded, Timeout = 15000 });
}
catch { }
await Task.Delay(3000);
var body = Page.Locator("body");
var text = await body.TextContentAsync();
text.ShouldNotBeNull();
}
[Fact]
public async Task Cameras_page_renders()
{
try
{
await Page.GotoAsync($"{BaseUrl}/sites/{Guid.NewGuid()}/cameras", new PageGotoOptions { WaitUntil = WaitUntilState.DOMContentLoaded, Timeout = 15000 });
}
catch { }
await Task.Delay(3000);
var body = Page.Locator("body");
var text = await body.TextContentAsync();
text.ShouldNotBeNull();
}
[Fact]
public async Task Agents_page_renders()
{
try
{
await Page.GotoAsync($"{BaseUrl}/sites/{Guid.NewGuid()}/agents", new PageGotoOptions { WaitUntil = WaitUntilState.DOMContentLoaded, Timeout = 15000 });
}
catch { }
await Task.Delay(3000);
var body = Page.Locator("body");
var text = await body.TextContentAsync();
text.ShouldNotBeNull();
}
}