diff --git a/src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Pages/Login.razor b/src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Pages/Login.razor index 3c1f01ad..b7718610 100644 --- a/src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Pages/Login.razor +++ b/src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Pages/Login.razor @@ -3,34 +3,8 @@ @using Microsoft.AspNetCore.Authorization @attribute [AllowAnonymous] -
-
-
-

ScadaBridge

- - @if (!string.IsNullOrEmpty(ErrorMessage)) - { - - } - -
-
- - -
-
- - -
- -
-
-
-
+ @code { - [SupplyParameterFromQuery(Name = "error")] - public string? ErrorMessage { get; set; } + [SupplyParameterFromQuery(Name = "error")] public string? ErrorMessage { get; set; } } diff --git a/tests/ZB.MOM.WW.ScadaBridge.CentralUI.Tests/ComponentRenderingTests.cs b/tests/ZB.MOM.WW.ScadaBridge.CentralUI.Tests/ComponentRenderingTests.cs index ab37abea..fca3802c 100644 --- a/tests/ZB.MOM.WW.ScadaBridge.CentralUI.Tests/ComponentRenderingTests.cs +++ b/tests/ZB.MOM.WW.ScadaBridge.CentralUI.Tests/ComponentRenderingTests.cs @@ -34,7 +34,7 @@ public class ComponentRenderingTests : BunitContext // Verify submit button var submitButton = cut.Find("button[type='submit']"); - Assert.Contains("Sign In", submitButton.TextContent); + Assert.Contains("Sign in", submitButton.TextContent); } [Fact] @@ -42,7 +42,7 @@ public class ComponentRenderingTests : BunitContext { var cut = Render(); - Assert.Throws(() => cut.Find("div.alert.alert-danger")); + Assert.Throws(() => cut.Find("div.panel.notice.login-error")); } [Fact] @@ -69,7 +69,7 @@ public class ComponentRenderingTests : BunitContext { var cut = Render(); - var title = cut.Find("h4.card-title"); - Assert.Equal("ScadaBridge", title.TextContent); + var title = cut.Find("h1.login-title"); + Assert.Contains("ScadaBridge", title.TextContent); } }