Files
Heimdall/tests/Heimdall.E2E.Tests/Pages/PageRenderTests.cs
T
arnaud.dartois 89c4c43922
Heimdall Gitea / Detect CI scope (push) Successful in 7s
Heimdall Gitea / Build and tests (push) Successful in 14m48s
Heimdall Gitea / Publish versioned release (push) Skipped
Heimdall Gitea / Build and scan server image (push) Successful in 4m27s
Heimdall Gitea / Build and scan agent image (push) Successful in 15m42s
Heimdall Gitea / Publish Docker Hub latest tags (push) Successful in 1m27s
Heimdall Gitea / CI policy (push) Successful in 2s
fix(identity): harden user lifecycle and permissions (#136)
Co-authored-by: Arnaud Dartois <admin@tordais.cc>
2026-11-04 13:33:30 +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();
}
}