Skip to content

Commit

Permalink
Use EnableAutoSetupIfNotUITesting in Program.cs.
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahelsaig committed Nov 11, 2023
1 parent d5fdd46 commit 5e1f0ca
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions src/Lombiq.OSOCE.Web/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,17 @@
// create UI tests check out the project.
builder.Services
.AddSingleton(configuration)
.AddOrchardCms(orchardCoreBuilder =>
{
orchardCoreBuilder.ConfigureFeaturesGuard(
.AddOrchardCms(orchardCoreBuilder => orchardCoreBuilder
.ConfigureFeaturesGuard(
new Dictionary<string, IEnumerable<string>>
{
["OrchardCore.Twitter"] = new[] { "Lombiq.UIKit", "Lombiq.ChartJs" },
});

if (!configuration.IsUITesting())
{
orchardCoreBuilder.AddSetupFeatures("OrchardCore.AutoSetup");
}
});
["OrchardCore.Twitter"] = new[]
{
Lombiq.UIKit.FeatureIds.Base,
Lombiq.ChartJs.Constants.FeatureIds.Default,
},
})
.EnableAutoSetupIfNotUITesting(configuration));

var app = builder.Build();

Expand Down

0 comments on commit 5e1f0ca

Please sign in to comment.