diff --git a/NuGetTest/src/Lombiq.OSOCE.NuGet.Web/Lombiq.OSOCE.NuGet.Web.csproj b/NuGetTest/src/Lombiq.OSOCE.NuGet.Web/Lombiq.OSOCE.NuGet.Web.csproj index 69be6c658..5284056c4 100644 --- a/NuGetTest/src/Lombiq.OSOCE.NuGet.Web/Lombiq.OSOCE.NuGet.Web.csproj +++ b/NuGetTest/src/Lombiq.OSOCE.NuGet.Web/Lombiq.OSOCE.NuGet.Web.csproj @@ -19,7 +19,7 @@ - + @@ -35,22 +35,22 @@ - - - - - - - - + + + + + + + + - - + + diff --git a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Lombiq.OSOCE.NuGet.Tests.UI.csproj b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Lombiq.OSOCE.NuGet.Tests.UI.csproj index 8dd43a3ad..fa26c60fd 100644 --- a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Lombiq.OSOCE.NuGet.Tests.UI.csproj +++ b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Lombiq.OSOCE.NuGet.Tests.UI.csproj @@ -30,19 +30,19 @@ - - - - - - - + + + + + + + - + diff --git a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorIdleTenantsTests.cs b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorIdleTenantsTests.cs index 25f56a13a..630c4c111 100644 --- a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorIdleTenantsTests.cs +++ b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorIdleTenantsTests.cs @@ -1,15 +1,15 @@ using Lombiq.Hosting.Tenants.IdleTenantManagement.Tests.UI.Extensions; +using Lombiq.OSOCE.NuGet.Tests.UI.Constants; using Lombiq.Tests.UI.Extensions; using System.Threading.Tasks; using Xunit; using Xunit.Abstractions; -using static Lombiq.OSOCE.NuGet.Tests.UI.Constants.RecipeIds; namespace Lombiq.OSOCE.NuGet.Tests.UI.Tests.ModuleTests; -public class IdleTenantTests : UITestBase +public class BehaviorIdleTenantsTests : UITestBase { - public IdleTenantTests(ITestOutputHelper testOutputHelper) + public BehaviorIdleTenantsTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } @@ -20,11 +20,7 @@ public Task ShuttingDownIdleTenantsShouldWork() => async context => { await context.SignInDirectlyAsync(); - - await context.TestIdleTenantManagerBehaviorAsync(TestsSetupRecipeId); - - context.Configuration.AssertAppLogsAsync = webApplicationInstance => - IdleTenantManagementExtensions.AssertAppLogsWithIdleCheckAsync(webApplicationInstance); + await context.TestIdleTenantManagerBehaviorAsync(RecipeIds.TestsSetupRecipeId); }, - configuration => configuration.SetMaxIdleMinutesAndLoggingForUITest()); + configuration => configuration.ConfigureIdleTenantManagementTestSettings()); } diff --git a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/UITestBase.cs b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/UITestBase.cs index aa356daaf..dc52b7cce 100644 --- a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/UITestBase.cs +++ b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/UITestBase.cs @@ -32,7 +32,7 @@ protected override Task ExecuteTestAsync( async configuration => { configuration.AssertAppLogsAsync = - OrchardCoreUITestExecutorConfiguration.AssertAppLogsCanContainWarningsAndCacheFolderErrorsAsync; + OrchardCoreUITestExecutorConfiguration.AssertAppLogsCanContainCacheFolderErrorsAsync; // These two can be removed once https://github.com/OrchardCMS/OrchardCore/issues/15222 is done. configuration.AssertBrowserLog = AssertHtmlAndBrowserErrorsHelper.AssertNoNativeButtonUsageInBrowserLog; diff --git a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests/Lombiq.OSOCE.NuGet.Tests.csproj b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests/Lombiq.OSOCE.NuGet.Tests.csproj index 6539d91e4..f112cb03c 100644 --- a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests/Lombiq.OSOCE.NuGet.Tests.csproj +++ b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests/Lombiq.OSOCE.NuGet.Tests.csproj @@ -6,7 +6,7 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/Readme.md b/Readme.md index b4af5fb22..16c5b9b41 100644 --- a/Readme.md +++ b/Readme.md @@ -131,7 +131,7 @@ When adding a new extension, or significant new features to existing extensions, - If you introduce .NET breaking changes, the Validate NuGet Publish workflow will fail due to [baseline package validation](https://learn.microsoft.com/en-us/dotnet/fundamentals/apicompat/package-validation/baseline-version-validator). Preferably, adjust the change to not be breaking if possible; if it has to be a breaking change, then you’ll need to create a _CompatibilitySuppressions.xml_ file to mark it as deliberate, what you can do with the following command: ```powershell -dotnet pack /p:EnablePackageValidation=true /p:PackageValidationBaselineVersion= /p:Version= /p:NuGetBuild=true /p:GenerateCompatibilitySuppressionFile=true +dotnet pack /p:EnablePackageValidation=true /p:PackageValidationBaselineVersion= /p:Version= /p:NuGetBuild=true /p:GenerateCompatibilitySuppressionFile=true ``` ### Dependencies between Lombiq projects diff --git a/src/Libraries/Lombiq.HelpfulLibraries b/src/Libraries/Lombiq.HelpfulLibraries index 2b4122eab..53a4c0267 160000 --- a/src/Libraries/Lombiq.HelpfulLibraries +++ b/src/Libraries/Lombiq.HelpfulLibraries @@ -1 +1 @@ -Subproject commit 2b4122eab516c5be3f9010d8928cad43cded67be +Subproject commit 53a4c0267d19df642f7ee9ff4425dd06c0d2186e diff --git a/src/Modules/Lombiq.Hosting.Tenants b/src/Modules/Lombiq.Hosting.Tenants index 28b5ecb12..6486d80a6 160000 --- a/src/Modules/Lombiq.Hosting.Tenants +++ b/src/Modules/Lombiq.Hosting.Tenants @@ -1 +1 @@ -Subproject commit 28b5ecb122b42c5515d215055662f25b167ab487 +Subproject commit 6486d80a63a8c687fdfdb9d82db0119911f22b32 diff --git a/test/Lombiq.OSOCE.Tests.UI/Helpers/AssertAppLogsHelpers.cs b/test/Lombiq.OSOCE.Tests.UI/Helpers/AssertAppLogsHelpers.cs deleted file mode 100644 index c44d6c77b..000000000 --- a/test/Lombiq.OSOCE.Tests.UI/Helpers/AssertAppLogsHelpers.cs +++ /dev/null @@ -1,35 +0,0 @@ -using Lombiq.Tests.UI.Extensions; -using Lombiq.Tests.UI.Services; -using Shouldly; -using System; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; - -namespace Lombiq.OSOCE.Tests.UI.Helpers; - -public static class AssertAppLogsHelpers -{ - public static readonly Func AssertOsoceAppLogsAreEmptyAsync = app => - app.OsoceLogsShouldBeEmptyAsync(); - - public static async Task OsoceLogsShouldBeEmptyAsync( - this IWebApplicationInstance webApplicationInstance, - CancellationToken cancellationToken = default) - { - var logOutput = await webApplicationInstance.GetLogOutputAsync(cancellationToken); - - if (!string.IsNullOrEmpty(logOutput)) - { - var messages = logOutput.SplitByNewLines().ToList(); - - // Temporarily filtering out irrelevant cache errors from logs. - var filteredLogOutput = messages.Where(message => - !message.Contains("|Lombiq.TrainingDemo.Services.DemoBackgroundTask|ERROR|Expected non-error") && - !message.Contains("OrchardCore.Media.Core.DefaultMediaFileStoreCacheFileProvider|ERROR|Error deleting cache folder")); - - var errors = filteredLogOutput.Where(item => item.Contains("|ERROR|") || item.Contains("|FATAL|")); - errors.ShouldBeEmpty(); - } - } -} diff --git a/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorIdleTenantsTests.cs b/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorIdleTenantsTests.cs index 51f62117b..ab85991a0 100644 --- a/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorIdleTenantsTests.cs +++ b/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorIdleTenantsTests.cs @@ -21,5 +21,5 @@ public Task ShuttingDownIdleTenantsShouldWork() => await context.SignInDirectlyAsync(); await context.TestIdleTenantManagerBehaviorAsync(); }, - configuration => configuration.SetMaxIdleMinutesAndLoggingForUITest()); + configuration => configuration.ConfigureIdleTenantManagementTestSettings()); } diff --git a/test/Lombiq.OSOCE.Tests.UI/UITestBase.cs b/test/Lombiq.OSOCE.Tests.UI/UITestBase.cs index eae5aa176..c389e046a 100644 --- a/test/Lombiq.OSOCE.Tests.UI/UITestBase.cs +++ b/test/Lombiq.OSOCE.Tests.UI/UITestBase.cs @@ -41,7 +41,5 @@ protected static void ChangeConfiguration(OrchardCoreUITestExecutorConfiguration configuration.BrowserConfiguration.Headless = TestConfigurationManager.GetBoolConfiguration("BrowserConfiguration:Headless", defaultValue: false); - - configuration.AssertAppLogsAsync = OrchardCoreUITestExecutorConfiguration.AssertAppLogsCanContainWarningsAndCacheFolderErrorsAsync; } } diff --git a/test/Lombiq.UITestingToolbox b/test/Lombiq.UITestingToolbox index 8a7e8c38b..8659d8f2f 160000 --- a/test/Lombiq.UITestingToolbox +++ b/test/Lombiq.UITestingToolbox @@ -1 +1 @@ -Subproject commit 8a7e8c38b7a02ee3fb4f3b932cc479979647a3be +Subproject commit 8659d8f2fad48e76144546ae58b19357e87d7b42 diff --git a/tools/Lombiq.GitHub.Actions b/tools/Lombiq.GitHub.Actions index 4ca5acf0c..c1cdbb81b 160000 --- a/tools/Lombiq.GitHub.Actions +++ b/tools/Lombiq.GitHub.Actions @@ -1 +1 @@ -Subproject commit 4ca5acf0ccf7a943e0d4f8324131074efc54ecb3 +Subproject commit c1cdbb81b39842e47dddf6943ca745f9fb79a53e