From f9ab49214657df2ba2cbf1642777e4b8d377c4f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Leh=C3=B3czky?= Date: Fri, 25 Mar 2022 22:59:13 +0100 Subject: [PATCH 1/5] Adapting to Helpful Libraries refactoring --- Lombiq.Tests.UI.Shortcuts/Controllers/AccountController.cs | 2 +- .../Controllers/ApplicationInfoController.cs | 2 +- Lombiq.Tests.UI.Shortcuts/Controllers/CurrentUserController.cs | 2 +- Lombiq.Tests.UI.Shortcuts/Controllers/ErrorController.cs | 2 +- Lombiq.Tests.UI.Shortcuts/Controllers/RecipeController.cs | 2 +- .../Controllers/ShellFeaturesController.cs | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Lombiq.Tests.UI.Shortcuts/Controllers/AccountController.cs b/Lombiq.Tests.UI.Shortcuts/Controllers/AccountController.cs index 451a504a9..03c1632dd 100644 --- a/Lombiq.Tests.UI.Shortcuts/Controllers/AccountController.cs +++ b/Lombiq.Tests.UI.Shortcuts/Controllers/AccountController.cs @@ -1,4 +1,4 @@ -using Lombiq.HelpfulLibraries.Libraries.Mvc; +using Lombiq.HelpfulLibraries.AspNetCore.Mvc; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Mvc; diff --git a/Lombiq.Tests.UI.Shortcuts/Controllers/ApplicationInfoController.cs b/Lombiq.Tests.UI.Shortcuts/Controllers/ApplicationInfoController.cs index 0866520b0..e9839f00a 100644 --- a/Lombiq.Tests.UI.Shortcuts/Controllers/ApplicationInfoController.cs +++ b/Lombiq.Tests.UI.Shortcuts/Controllers/ApplicationInfoController.cs @@ -1,4 +1,4 @@ -using Lombiq.HelpfulLibraries.Libraries.Mvc; +using Lombiq.HelpfulLibraries.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc; using OrchardCore.Modules; diff --git a/Lombiq.Tests.UI.Shortcuts/Controllers/CurrentUserController.cs b/Lombiq.Tests.UI.Shortcuts/Controllers/CurrentUserController.cs index aadfa7099..926580e3b 100644 --- a/Lombiq.Tests.UI.Shortcuts/Controllers/CurrentUserController.cs +++ b/Lombiq.Tests.UI.Shortcuts/Controllers/CurrentUserController.cs @@ -1,4 +1,4 @@ -using Lombiq.HelpfulLibraries.Libraries.Mvc; +using Lombiq.HelpfulLibraries.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc; namespace Lombiq.Tests.UI.Shortcuts.Controllers; diff --git a/Lombiq.Tests.UI.Shortcuts/Controllers/ErrorController.cs b/Lombiq.Tests.UI.Shortcuts/Controllers/ErrorController.cs index 9c7827c5d..3c524852e 100644 --- a/Lombiq.Tests.UI.Shortcuts/Controllers/ErrorController.cs +++ b/Lombiq.Tests.UI.Shortcuts/Controllers/ErrorController.cs @@ -1,4 +1,4 @@ -using Lombiq.HelpfulLibraries.Libraries.Mvc; +using Lombiq.HelpfulLibraries.AspNetCore.Mvc; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using System; diff --git a/Lombiq.Tests.UI.Shortcuts/Controllers/RecipeController.cs b/Lombiq.Tests.UI.Shortcuts/Controllers/RecipeController.cs index 18d146a08..91ceed10f 100644 --- a/Lombiq.Tests.UI.Shortcuts/Controllers/RecipeController.cs +++ b/Lombiq.Tests.UI.Shortcuts/Controllers/RecipeController.cs @@ -1,4 +1,4 @@ -using Lombiq.HelpfulLibraries.Libraries.Mvc; +using Lombiq.HelpfulLibraries.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; using OrchardCore.Modules; diff --git a/Lombiq.Tests.UI.Shortcuts/Controllers/ShellFeaturesController.cs b/Lombiq.Tests.UI.Shortcuts/Controllers/ShellFeaturesController.cs index 6d22994f4..8d4f558a7 100644 --- a/Lombiq.Tests.UI.Shortcuts/Controllers/ShellFeaturesController.cs +++ b/Lombiq.Tests.UI.Shortcuts/Controllers/ShellFeaturesController.cs @@ -1,4 +1,4 @@ -using Lombiq.HelpfulLibraries.Libraries.Mvc; +using Lombiq.HelpfulLibraries.AspNetCore.Mvc; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using OrchardCore.Environment.Extensions; From 625efeeb1cf7d45c7e613af112f7185104830500 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Leh=C3=B3czky?= Date: Sat, 26 Mar 2022 16:28:54 +0100 Subject: [PATCH 2/5] Adapting to Helpful Libraries refactoring --- Lombiq.Tests.UI/Extensions/ShortcutsUITestContextExtensions.cs | 2 +- Lombiq.Tests.UI/Extensions/TypedRouteUITestContextExtensions.cs | 2 +- Lombiq.Tests.UI/MonkeyTesting/MonkeyTester.cs | 2 +- Lombiq.Tests.UI/Services/PortLeaseManager.cs | 2 +- Lombiq.Tests.UI/Services/UITestContext.cs | 2 +- Lombiq.Tests.UI/Services/UITestExecutor.cs | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Lombiq.Tests.UI/Extensions/ShortcutsUITestContextExtensions.cs b/Lombiq.Tests.UI/Extensions/ShortcutsUITestContextExtensions.cs index b147a4afa..9b72c78df 100644 --- a/Lombiq.Tests.UI/Extensions/ShortcutsUITestContextExtensions.cs +++ b/Lombiq.Tests.UI/Extensions/ShortcutsUITestContextExtensions.cs @@ -1,4 +1,4 @@ -using Lombiq.HelpfulLibraries.Libraries.Mvc; +using Lombiq.HelpfulLibraries.OrchardCore.Mvc; using Lombiq.Tests.UI.Constants; using Lombiq.Tests.UI.Services; using Lombiq.Tests.UI.Shortcuts.Controllers; diff --git a/Lombiq.Tests.UI/Extensions/TypedRouteUITestContextExtensions.cs b/Lombiq.Tests.UI/Extensions/TypedRouteUITestContextExtensions.cs index c1e83eae2..b3a8e131e 100644 --- a/Lombiq.Tests.UI/Extensions/TypedRouteUITestContextExtensions.cs +++ b/Lombiq.Tests.UI/Extensions/TypedRouteUITestContextExtensions.cs @@ -5,7 +5,7 @@ using System.Linq.Expressions; using System.Threading.Tasks; -namespace Lombiq.HelpfulLibraries.Libraries.Mvc; +namespace Lombiq.HelpfulLibraries.OrchardCore.Mvc; public static class TypedRouteUITestContextExtensions { diff --git a/Lombiq.Tests.UI/MonkeyTesting/MonkeyTester.cs b/Lombiq.Tests.UI/MonkeyTesting/MonkeyTester.cs index c0898c561..ccfc33ff1 100644 --- a/Lombiq.Tests.UI/MonkeyTesting/MonkeyTester.cs +++ b/Lombiq.Tests.UI/MonkeyTesting/MonkeyTester.cs @@ -1,5 +1,5 @@ using Atata; -using Lombiq.HelpfulLibraries.Libraries.Utilities; +using Lombiq.HelpfulLibraries.Common.Utilities; using Lombiq.Tests.UI.Extensions; using Lombiq.Tests.UI.Services; using OpenQA.Selenium; diff --git a/Lombiq.Tests.UI/Services/PortLeaseManager.cs b/Lombiq.Tests.UI/Services/PortLeaseManager.cs index 43c594b21..66b881b51 100644 --- a/Lombiq.Tests.UI/Services/PortLeaseManager.cs +++ b/Lombiq.Tests.UI/Services/PortLeaseManager.cs @@ -1,4 +1,4 @@ -using Lombiq.HelpfulLibraries.Libraries.Utilities; +using Lombiq.HelpfulLibraries.Common.Utilities; using System.Collections.Generic; using System.Linq; diff --git a/Lombiq.Tests.UI/Services/UITestContext.cs b/Lombiq.Tests.UI/Services/UITestContext.cs index f378b1684..47398335b 100644 --- a/Lombiq.Tests.UI/Services/UITestContext.cs +++ b/Lombiq.Tests.UI/Services/UITestContext.cs @@ -1,4 +1,4 @@ -using Lombiq.HelpfulLibraries.Libraries.Mvc; +using Lombiq.HelpfulLibraries.OrchardCore.Mvc; using Lombiq.Tests.UI.Exceptions; using Lombiq.Tests.UI.Extensions; using OpenQA.Selenium; diff --git a/Lombiq.Tests.UI/Services/UITestExecutor.cs b/Lombiq.Tests.UI/Services/UITestExecutor.cs index 4863740a4..c7425adaf 100644 --- a/Lombiq.Tests.UI/Services/UITestExecutor.cs +++ b/Lombiq.Tests.UI/Services/UITestExecutor.cs @@ -1,4 +1,4 @@ -using Lombiq.HelpfulLibraries.Libraries.Utilities; +using Lombiq.HelpfulLibraries.Common.Utilities; using Lombiq.Tests.UI.Extensions; using Lombiq.Tests.UI.Helpers; using Lombiq.Tests.UI.Models; From 829d707ecb3544b8b85da14d4da3ef677c0c4347 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Leh=C3=B3czky?= Date: Sat, 26 Mar 2022 17:49:46 +0100 Subject: [PATCH 3/5] Attempting to fix that sometimes not the Samples .htmlvalidate.json gets to the output folder --- Lombiq.Tests.UI.Samples/Lombiq.Tests.UI.Samples.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lombiq.Tests.UI.Samples/Lombiq.Tests.UI.Samples.csproj b/Lombiq.Tests.UI.Samples/Lombiq.Tests.UI.Samples.csproj index df372acfe..b1ff640c7 100644 --- a/Lombiq.Tests.UI.Samples/Lombiq.Tests.UI.Samples.csproj +++ b/Lombiq.Tests.UI.Samples/Lombiq.Tests.UI.Samples.csproj @@ -15,7 +15,7 @@ - PreserveNewest + Always PreserveNewest From cfa30473c7d49e349882f1a0169ee30716c28ffe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Leh=C3=B3czky?= Date: Sat, 26 Mar 2022 18:20:05 +0100 Subject: [PATCH 4/5] Fixing analyzer violations --- .../Controllers/FeatureToggleTestBenchController.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Lombiq.Tests.UI.Shortcuts/Controllers/FeatureToggleTestBenchController.cs b/Lombiq.Tests.UI.Shortcuts/Controllers/FeatureToggleTestBenchController.cs index 676679cdb..b0a1d7e59 100644 --- a/Lombiq.Tests.UI.Shortcuts/Controllers/FeatureToggleTestBenchController.cs +++ b/Lombiq.Tests.UI.Shortcuts/Controllers/FeatureToggleTestBenchController.cs @@ -14,5 +14,9 @@ public class FeatureToggleTestBenchController : Controller "CA1822:Mark members as static", Justification = "It's a controller action that needs to be instance-level.")] #pragma warning restore IDE0079 // Remove unnecessary suppression + [SuppressMessage( + "Minor Code Smell", + "S3400:Methods should not return constants", + Justification = "Necessary to check that it works when run from a test.")] public string Index() => "The Feature Toggle Test Bench worked."; } From c487c166338a4b2dec0f3331572e797c1b5ece73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Leh=C3=B3czky?= Date: Sat, 26 Mar 2022 18:53:53 +0100 Subject: [PATCH 5/5] Reducing Helpful Libraries dependencies to minimum --- Lombiq.Tests.UI.Shortcuts/Lombiq.Tests.UI.Shortcuts.csproj | 5 ++--- Lombiq.Tests.UI/Lombiq.Tests.UI.csproj | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Lombiq.Tests.UI.Shortcuts/Lombiq.Tests.UI.Shortcuts.csproj b/Lombiq.Tests.UI.Shortcuts/Lombiq.Tests.UI.Shortcuts.csproj index db46b3691..0036f684c 100644 --- a/Lombiq.Tests.UI.Shortcuts/Lombiq.Tests.UI.Shortcuts.csproj +++ b/Lombiq.Tests.UI.Shortcuts/Lombiq.Tests.UI.Shortcuts.csproj @@ -43,12 +43,11 @@ - - + - + diff --git a/Lombiq.Tests.UI/Lombiq.Tests.UI.csproj b/Lombiq.Tests.UI/Lombiq.Tests.UI.csproj index 7a0cc0222..5afb786be 100644 --- a/Lombiq.Tests.UI/Lombiq.Tests.UI.csproj +++ b/Lombiq.Tests.UI/Lombiq.Tests.UI.csproj @@ -73,15 +73,15 @@ + - - +