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.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 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..794dbe1 100644 --- a/Lombiq.Privacy.Tests.UI/Extensions/TestCaseUITestContextExtensions.cs +++ b/Lombiq.Privacy.Tests.UI/Extensions/TestCaseUITestContextExtensions.cs @@ -1,8 +1,8 @@ using Lombiq.Privacy.Tests.UI.Constants; +using Lombiq.Tests.UI.Constants; using Lombiq.Tests.UI.Extensions; using Lombiq.Tests.UI.Services; using OpenQA.Selenium; -using OrchardCore.Users.Models; using Shouldly; using System.Threading.Tasks; @@ -101,13 +101,12 @@ public static async Task TestRegistrationConsentCheckboxAsync(this UITestContext { await context.EnablePrivacyConsentBannerFeatureAsync(); await context.EnablePrivacyRegistrationConsentFeatureAsync(); - await context.SetUserRegistrationTypeAsync(UserRegistrationType.AllowRegistration); await context.TestRegistrationConsentCheckboxContentAsync(); // 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 +114,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(); 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 @@ - + 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();