From ee243a3e95819eff817ce2da382c2139c5332727 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Leh=C3=B3czky?= Date: Thu, 28 Nov 2024 01:12:46 +0100 Subject: [PATCH 1/5] Using new UITT TestUser --- Lombiq.Privacy.Tests.UI/Constants/TestUser.cs | 8 -------- .../Extensions/TestCaseUITestContextExtensions.cs | 7 ++++--- 2 files changed, 4 insertions(+), 11 deletions(-) delete mode 100644 Lombiq.Privacy.Tests.UI/Constants/TestUser.cs diff --git a/Lombiq.Privacy.Tests.UI/Constants/TestUser.cs b/Lombiq.Privacy.Tests.UI/Constants/TestUser.cs deleted file mode 100644 index 611600a..0000000 --- a/Lombiq.Privacy.Tests.UI/Constants/TestUser.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace Lombiq.Privacy.Tests.UI.Constants; - -public static class TestUser -{ - public const string Name = "johndoe"; // #spell-check-ignore-line - public const string Password = "Password1!"; - public const string Email = "jon.doe@lombiq.com"; // #spell-check-ignore-line -} diff --git a/Lombiq.Privacy.Tests.UI/Extensions/TestCaseUITestContextExtensions.cs b/Lombiq.Privacy.Tests.UI/Extensions/TestCaseUITestContextExtensions.cs index a9ba367..2b33872 100644 --- a/Lombiq.Privacy.Tests.UI/Extensions/TestCaseUITestContextExtensions.cs +++ b/Lombiq.Privacy.Tests.UI/Extensions/TestCaseUITestContextExtensions.cs @@ -1,4 +1,5 @@ using Lombiq.Privacy.Tests.UI.Constants; +using Lombiq.Tests.UI.Constants; using Lombiq.Tests.UI.Extensions; using Lombiq.Tests.UI.Services; using OpenQA.Selenium; @@ -107,7 +108,7 @@ public static async Task TestRegistrationConsentCheckboxAsync(this UITestContext // Go to registration and create a new user. await context.GoToRegistrationPageAsync(); - await context.FillInWithRetriesAsync(By.Id("RegisterUserForm_UserName"), TestUser.Name); + await context.FillInWithRetriesAsync(By.Id("RegisterUserForm_UserName"), TestUser.UserName); await context.FillInWithRetriesAsync(By.Id("RegisterUserForm_Email"), TestUser.Email); await context.FillInWithRetriesAsync(By.Id("RegisterUserForm_Password"), TestUser.Password); await context.FillInWithRetriesAsync(By.Id("RegisterUserForm_ConfirmPassword"), TestUser.Password); @@ -115,8 +116,8 @@ public static async Task TestRegistrationConsentCheckboxAsync(this UITestContext await context.ClickReliablyOnSubmitAsync(); // Login with the created user. - await context.SignInDirectlyAsync(TestUser.Name); - (await context.GetCurrentUserNameAsync()).ShouldBe(TestUser.Name); + await context.SignInDirectlyAsync(TestUser.UserName); + (await context.GetCurrentUserNameAsync()).ShouldBe(TestUser.UserName); // Check that, the consent banner doesn't come up after login. await context.GoToHomePageAsync(); From e2cb718f9e43d582deab4334b06177169c0a2a1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Leh=C3=B3czky?= Date: Thu, 28 Nov 2024 02:55:31 +0100 Subject: [PATCH 2/5] Using AddDisplayDriver() --- .../Lombiq.Privacy.Samples.csproj | 6 +++--- Lombiq.Privacy/Lombiq.Privacy.csproj | 18 +++++++++--------- Lombiq.Privacy/Startup.cs | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Lombiq.Privacy.Samples/Lombiq.Privacy.Samples.csproj b/Lombiq.Privacy.Samples/Lombiq.Privacy.Samples.csproj index c01ee7f..76d6273 100644 --- a/Lombiq.Privacy.Samples/Lombiq.Privacy.Samples.csproj +++ b/Lombiq.Privacy.Samples/Lombiq.Privacy.Samples.csproj @@ -22,9 +22,9 @@ - - - + + + diff --git a/Lombiq.Privacy/Lombiq.Privacy.csproj b/Lombiq.Privacy/Lombiq.Privacy.csproj index 74d7b48..77dcce7 100644 --- a/Lombiq.Privacy/Lombiq.Privacy.csproj +++ b/Lombiq.Privacy/Lombiq.Privacy.csproj @@ -32,15 +32,15 @@ - - - - - - - - - + + + + + + + + + diff --git a/Lombiq.Privacy/Startup.cs b/Lombiq.Privacy/Startup.cs index f17f4fa..d8239df 100644 --- a/Lombiq.Privacy/Startup.cs +++ b/Lombiq.Privacy/Startup.cs @@ -107,7 +107,7 @@ public sealed class RegistrationConsentStartup : StartupBase public override void ConfigureServices(IServiceCollection services) { - services.AddScoped, RegistrationCheckboxDriver>(); + services.AddDisplayDriver(); services.AddScoped(); services.AddDataMigration(); services.AddNavigationProvider(); From 420bbbbf9ffe924109fa4b002c235118e0c77bd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Leh=C3=B3czky?= Date: Thu, 28 Nov 2024 03:41:13 +0100 Subject: [PATCH 3/5] Removing deprecated code --- .../Extensions/TestCaseUITestContextExtensions.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/Lombiq.Privacy.Tests.UI/Extensions/TestCaseUITestContextExtensions.cs b/Lombiq.Privacy.Tests.UI/Extensions/TestCaseUITestContextExtensions.cs index 2b33872..794dbe1 100644 --- a/Lombiq.Privacy.Tests.UI/Extensions/TestCaseUITestContextExtensions.cs +++ b/Lombiq.Privacy.Tests.UI/Extensions/TestCaseUITestContextExtensions.cs @@ -3,7 +3,6 @@ using Lombiq.Tests.UI.Extensions; using Lombiq.Tests.UI.Services; using OpenQA.Selenium; -using OrchardCore.Users.Models; using Shouldly; using System.Threading.Tasks; @@ -102,7 +101,6 @@ public static async Task TestRegistrationConsentCheckboxAsync(this UITestContext { await context.EnablePrivacyConsentBannerFeatureAsync(); await context.EnablePrivacyRegistrationConsentFeatureAsync(); - await context.SetUserRegistrationTypeAsync(UserRegistrationType.AllowRegistration); await context.TestRegistrationConsentCheckboxContentAsync(); From 4448935d00fc45ae55fc69475c5a71cd55fb8bdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Leh=C3=B3czky?= Date: Thu, 28 Nov 2024 19:17:52 +0100 Subject: [PATCH 4/5] Updating UITT reference to latest alpha --- Lombiq.Privacy.Tests.UI/Lombiq.Privacy.Tests.UI.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lombiq.Privacy.Tests.UI/Lombiq.Privacy.Tests.UI.csproj b/Lombiq.Privacy.Tests.UI/Lombiq.Privacy.Tests.UI.csproj index 0c18234..738483d 100644 --- a/Lombiq.Privacy.Tests.UI/Lombiq.Privacy.Tests.UI.csproj +++ b/Lombiq.Privacy.Tests.UI/Lombiq.Privacy.Tests.UI.csproj @@ -25,7 +25,7 @@ - + From 2b93d1b50897928c3b76d69abb3e907a1e69fe45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Leh=C3=B3czky?= Date: Thu, 28 Nov 2024 19:22:36 +0100 Subject: [PATCH 5/5] Suppressing breaking changes --- Lombiq.Privacy.Tests.UI/CompatibilitySuppressions.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Lombiq.Privacy.Tests.UI/CompatibilitySuppressions.xml diff --git a/Lombiq.Privacy.Tests.UI/CompatibilitySuppressions.xml b/Lombiq.Privacy.Tests.UI/CompatibilitySuppressions.xml new file mode 100644 index 0000000..8f7dd04 --- /dev/null +++ b/Lombiq.Privacy.Tests.UI/CompatibilitySuppressions.xml @@ -0,0 +1,11 @@ + + + + + CP0001 + T:Lombiq.Privacy.Tests.UI.Constants.TestUser + lib/net8.0/Lombiq.Privacy.Tests.UI.dll + lib/net8.0/Lombiq.Privacy.Tests.UI.dll + true + + \ No newline at end of file