From 2e45c37925d71f7c9c3aef3483acfaef18d23fe1 Mon Sep 17 00:00:00 2001 From: Arnaud Dartois Date: Sun, 25 Oct 2026 05:17:23 +0100 Subject: [PATCH] test(web): align localized page assertions --- tests/Heimdall.Web.Tests/Components/Pages/A11yPageTests.cs | 2 +- tests/Heimdall.Web.Tests/Components/Pages/DashboardTests.cs | 4 ++-- tests/Heimdall.Web.Tests/Components/Pages/ProfileTests.cs | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/Heimdall.Web.Tests/Components/Pages/A11yPageTests.cs b/tests/Heimdall.Web.Tests/Components/Pages/A11yPageTests.cs index a8c1708..eadd96a 100644 --- a/tests/Heimdall.Web.Tests/Components/Pages/A11yPageTests.cs +++ b/tests/Heimdall.Web.Tests/Components/Pages/A11yPageTests.cs @@ -39,7 +39,7 @@ public class A11yPageTests : PageTestBase LoginAs(); var cut = RenderPage(); - cut.WaitForAssertion(() => cut.Markup.ShouldContain("Dashboard")); + cut.WaitForAssertion(() => cut.Markup.ShouldContain("Tableau de bord")); cut.FindAll("h1").Count.ShouldBe(1); // Le titre de page est le seul h1 ; les compteurs de stats restent des h4 diff --git a/tests/Heimdall.Web.Tests/Components/Pages/DashboardTests.cs b/tests/Heimdall.Web.Tests/Components/Pages/DashboardTests.cs index 44c2bea..dee3117 100644 --- a/tests/Heimdall.Web.Tests/Components/Pages/DashboardTests.cs +++ b/tests/Heimdall.Web.Tests/Components/Pages/DashboardTests.cs @@ -67,7 +67,7 @@ public class DashboardTests : PageTestBase { cut.Markup.ShouldContain("Caméras"); cut.Markup.ShouldContain("Agents en ligne"); - cut.Markup.ShouldContain("Événements (24h)"); + cut.Markup.ShouldContain("Événements (24 h)"); cut.Markup.ShouldContain("Sites"); cut.Markup.ShouldContain("42"); cut.Markup.ShouldContain("7"); @@ -112,7 +112,7 @@ public class DashboardTests : PageTestBase cut.WaitForAssertion(() => { - cut.Markup.ShouldContain("Derniers événements"); + cut.Markup.ShouldContain("Événements récents"); cut.Markup.ShouldContain("Personne"); cut.Markup.ShouldContain("87%"); }); diff --git a/tests/Heimdall.Web.Tests/Components/Pages/ProfileTests.cs b/tests/Heimdall.Web.Tests/Components/Pages/ProfileTests.cs index 960c3e9..d333cef 100644 --- a/tests/Heimdall.Web.Tests/Components/Pages/ProfileTests.cs +++ b/tests/Heimdall.Web.Tests/Components/Pages/ProfileTests.cs @@ -47,13 +47,13 @@ public class ProfileTests : PageTestBase cut.WaitForAssertion(() => { - cut.Markup.ShouldContain("Mon profil"); + cut.Markup.ShouldContain("Profil"); cut.Markup.ShouldContain("Jean Dupont"); cut.Markup.ShouldContain("jean@heimdall.local"); cut.Markup.ShouldContain("Informations personnelles"); cut.Markup.ShouldContain("Changer le mot de passe"); cut.Markup.ShouldContain("Notifications"); - cut.Markup.ShouldContain("Activé"); // 2FA + cut.Markup.ShouldContain("Activée"); // 2FA cut.Markup.ShouldContain("Oui"); // Email confirmé }); } @@ -185,7 +185,7 @@ public class ProfileTests : PageTestBase { var snackbar = Services.GetRequiredService(); snackbar.ShownSnackbars.Select(m => m.Message?.ToString() ?? "") - .ShouldContain(m => m.Contains("Configuration notifications mise à jour", StringComparison.OrdinalIgnoreCase)); + .ShouldContain(m => m.Contains("Configuration des notifications mise à jour", StringComparison.OrdinalIgnoreCase)); }); } }