From a9f26ddebb25d606916417ccefe5c18ee9b3e54d Mon Sep 17 00:00:00 2001 From: Arnaud Dartois Date: Sun, 25 Oct 2026 20:02:11 +0100 Subject: [PATCH] test(cameras): wait for snapshot tile readiness --- .../Heimdall.Web.Tests/Components/Pages/CamerasPageTests.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/Heimdall.Web.Tests/Components/Pages/CamerasPageTests.cs b/tests/Heimdall.Web.Tests/Components/Pages/CamerasPageTests.cs index 2d95425..9e0ffc7 100644 --- a/tests/Heimdall.Web.Tests/Components/Pages/CamerasPageTests.cs +++ b/tests/Heimdall.Web.Tests/Components/Pages/CamerasPageTests.cs @@ -111,6 +111,9 @@ public class CamerasPageTests : PageTestBase var cut = RenderPage(p => p.Add(x => x.SiteId, SiteId)); cut.WaitForAssertion(() => cut.Markup.ShouldContain("Caméra Entrée")); + cut.WaitForAssertion(() => cut.FindAll("button") + .Single(button => button.GetAttribute("aria-label") == "Prendre un instantané") + .HasAttribute("disabled").ShouldBeFalse()); cut.FindAll("button").Single(button => button.GetAttribute("aria-label") == "Prendre un instantané").Click(); cut.WaitForAssertion(() => @@ -144,6 +147,9 @@ public class CamerasPageTests : PageTestBase var cut = RenderPage(p => p.Add(x => x.SiteId, SiteId)); cut.WaitForAssertion(() => cut.Markup.ShouldContain("Caméra Entrée")); + cut.WaitForAssertion(() => cut.FindAll("button") + .Single(button => button.GetAttribute("aria-label") == "Prendre un instantané") + .HasAttribute("disabled").ShouldBeFalse()); cut.FindAll("button").Single(button => button.GetAttribute("aria-label") == "Prendre un instantané").Click(); cut.WaitForAssertion(() => cut.Markup.ShouldContain("La capture prend plus de temps que prévu"));