From 90647091810100967719eb6067d05d4784ba6540 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Leh=C3=B3czky?= Date: Fri, 26 Jan 2024 18:47:49 +0100 Subject: [PATCH] Better UI testing config --- .../DotNest.Core.SDK.Web.csproj | 5 +++-- src/DotNest.Core.SDK.Web/Program.cs | 13 +++---------- .../DotNest.Core.SDK.Tests.UI.csproj | 2 +- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/src/DotNest.Core.SDK.Web/DotNest.Core.SDK.Web.csproj b/src/DotNest.Core.SDK.Web/DotNest.Core.SDK.Web.csproj index b0e04ec..7260a94 100644 --- a/src/DotNest.Core.SDK.Web/DotNest.Core.SDK.Web.csproj +++ b/src/DotNest.Core.SDK.Web/DotNest.Core.SDK.Web.csproj @@ -1,4 +1,4 @@ - + net6.0 @@ -35,7 +35,8 @@ - + + diff --git a/src/DotNest.Core.SDK.Web/Program.cs b/src/DotNest.Core.SDK.Web/Program.cs index 4185ba9..7041240 100644 --- a/src/DotNest.Core.SDK.Web/Program.cs +++ b/src/DotNest.Core.SDK.Web/Program.cs @@ -12,18 +12,11 @@ builder.Services .AddSingleton(configuration) .AddOrchardCms(orchardCoreBuilder => - { orchardCoreBuilder .AddDatabaseShellsConfigurationIfAvailable(configuration) - .ConfigureSmtpSettings(overrideAdminSettings: false); - - if (builder.Environment.IsDevelopment()) - { - orchardCoreBuilder - .AddSetupFeatures("OrchardCore.AutoSetup") - .HideRecipesByTagsFromSetup("test", "HideFromSetupScreen"); - } - }); + .ConfigureSmtpSettings(overrideAdminSettings: false) + .EnableAutoSetupIfNotUITesting(configuration) + .HideRecipesByTagsFromSetup("test", "HideFromSetupScreen")); var app = builder.Build(); diff --git a/test/DotNest.Core.SDK.Tests.UI/DotNest.Core.SDK.Tests.UI.csproj b/test/DotNest.Core.SDK.Tests.UI/DotNest.Core.SDK.Tests.UI.csproj index bb049a7..8e2c673 100644 --- a/test/DotNest.Core.SDK.Tests.UI/DotNest.Core.SDK.Tests.UI.csproj +++ b/test/DotNest.Core.SDK.Tests.UI/DotNest.Core.SDK.Tests.UI.csproj @@ -8,7 +8,7 @@ - +