diff --git a/.github/actions/spelling/allow.txt b/.github/actions/spelling/allow.txt
index dbe169530..224f1502e 100644
--- a/.github/actions/spelling/allow.txt
+++ b/.github/actions/spelling/allow.txt
@@ -13,6 +13,7 @@ Overconstrained
parallelizable
qrcode
retriable
+Runtimes
sanitizers
scrollbars
shortcutting
diff --git a/.github/actions/spelling/excludes.txt b/.github/actions/spelling/excludes.txt
index 0b74a71f6..dba700b74 100644
--- a/.github/actions/spelling/excludes.txt
+++ b/.github/actions/spelling/excludes.txt
@@ -1,6 +1,9 @@
Assets/Vendors/
\QLombiq.VueJs.Tests.UI/Assets/Media/\E.*\.mjpeg$
^\Qtest/Lombiq.UITestingToolbox/Lombiq.Tests.UI/Constants/CommonDisplayResolutions.cs\E$
+^\Qtest/Lombiq.UITestingToolbox/Lombiq.Tests.UI/SecurityScanning/AutomationFrameworkPlanFragments/\E.*.yml$
+^\Qtest/Lombiq.UITestingToolbox/Lombiq.Tests.UI/SecurityScanning/AutomationFrameworkPlans/\E.*.yml$
+^\Qtest/Lombiq.UITestingToolbox/Lombiq.Tests.UI.Samples/Tests/CustomZapAutomationFrameworkPlan.yml\E$
^\Qtools/Lombiq.GitHub.Actions/\E
\QUnmanagedNodeModules/\E
\QUploadingTestFileDOCX.docx\E$
diff --git a/.github/workflows/build-and-test-windows.yml b/.github/workflows/build-and-test-windows.yml
index f37cd3e4a..97e6a4856 100644
--- a/.github/workflows/build-and-test-windows.yml
+++ b/.github/workflows/build-and-test-windows.yml
@@ -13,7 +13,7 @@ on:
jobs:
remove-run-windows-build-label:
- if: github.ref_name != github.event.repository.default_branch &&
+ if: github.ref_name != github.event.repository.default_branch &&
github.event.label.name == 'run-windows-build'
name: Remove Run Windows Build Label
runs-on: ubuntu-22.04
@@ -30,11 +30,12 @@ jobs:
type: remove
build-and-test-larger-runners:
- if: github.ref_name != github.event.repository.default_branch &&
+ if: github.ref_name != github.event.repository.default_branch &&
(github.event_name == 'workflow_dispatch' || github.event.label.name == 'run-windows-build')
name: Build and Test Windows - root solution (larger runners)
uses: Lombiq/GitHub-Actions/.github/workflows/build-and-test-orchard-core.yml@dev
with:
+ parent-job-name: "root-solution-larger-runners"
machine-types: "['gitrunners-windows-2022-x64-8vcpu']"
timeout-minutes: 30
set-up-sql-server: "true"
@@ -42,6 +43,9 @@ jobs:
ui-test-parallelism: 0
build-create-binary-log: "true"
blame-hang-timeout: "5m"
+ # Running ZAP for security scans in Docker under GHA Windows runners won't work since such virtualization is not
+ # supported by GHA.
+ test-filter: "FullyQualifiedName!~SecurityScanningTests"
build-and-test-standard-runners:
# Since dev builds are not awaited by anyone, they can run on the slower free runners.
@@ -49,27 +53,35 @@ jobs:
name: Build and Test Windows - root solution (standard runners)
uses: Lombiq/GitHub-Actions/.github/workflows/build-and-test-orchard-core.yml@dev
with:
+ parent-job-name: "root-solution-standard-runners"
machine-types: "['windows-2022']"
timeout-minutes: 60
set-up-sql-server: "true"
set-up-azurite: "true"
build-create-binary-log: "true"
blame-hang-timeout: "5m"
+ # Running ZAP for security scans in Docker under GHA Windows runners won't work since such virtualization is not
+ # supported by GHA.
+ test-filter: "FullyQualifiedName!~SecurityScanningTests"
build-and-test-nuget-test:
- if: github.ref_name == github.event.repository.default_branch ||
+ if: github.ref_name == github.event.repository.default_branch ||
github.event_name == 'workflow_dispatch' ||
github.event.label.name == 'run-windows-build'
name: Build and Test Windows - NuGetTest solution
uses: Lombiq/GitHub-Actions/.github/workflows/build-and-test-orchard-core.yml@dev
with:
+ parent-job-name: "nuget-solution"
machine-types: "['windows-2022']"
build-directory: NuGetTest
timeout-minutes: 25
blame-hang-timeout: "5m"
+ # Running ZAP for security scans in Docker under GHA Windows runners won't work since such virtualization is not
+ # supported by GHA.
+ test-filter: "FullyQualifiedName!~SecurityScanningTests"
powershell-static-code-analysis:
- if: github.ref_name == github.event.repository.default_branch ||
+ if: github.ref_name == github.event.repository.default_branch ||
github.event_name == 'workflow_dispatch' ||
github.event.label.name == 'run-windows-build'
name: PowerShell Static Code Analysis Windows
diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml
index 2a6ff16b7..2d7f9a1d1 100644
--- a/.github/workflows/build-and-test.yml
+++ b/.github/workflows/build-and-test.yml
@@ -13,13 +13,16 @@ jobs:
name: Build and Test - root solution (larger runners)
uses: Lombiq/GitHub-Actions/.github/workflows/build-and-test-orchard-core.yml@dev
with:
- machine-types: "['gitrunners-ubuntu-2204-x64-4vcpu']"
+ parent-job-name: "root-solution-larger-runners"
+ machine-types: "['buildjet-4vcpu-ubuntu-2204']"
timeout-minutes: 20
set-up-sql-server: "true"
set-up-azurite: "true"
ui-test-parallelism: 0
build-create-binary-log: "true"
blame-hang-timeout: "5m"
+ build-enable-nuget-caching: "true"
+ build-enable-npm-caching: "true"
build-and-test-standard-runners:
# Since dev builds are not awaited by anyone, they can run on the slower free runners.
@@ -27,6 +30,7 @@ jobs:
name: Build and Test - root solution (standard runners)
uses: Lombiq/GitHub-Actions/.github/workflows/build-and-test-orchard-core.yml@dev
with:
+ parent-job-name: "root-solution-standard-runners"
timeout-minutes: 40
set-up-sql-server: "true"
set-up-azurite: "true"
@@ -37,6 +41,7 @@ jobs:
name: Build and Test - NuGetTest solution
uses: Lombiq/GitHub-Actions/.github/workflows/build-and-test-orchard-core.yml@dev
with:
+ parent-job-name: "nuget-solution"
build-directory: NuGetTest
timeout-minutes: 15
blame-hang-timeout: "5m"
diff --git a/.prettierrc.js b/.prettierrc.js
new file mode 100644
index 000000000..1d971007e
--- /dev/null
+++ b/.prettierrc.js
@@ -0,0 +1,7 @@
+// The following path may have to be adjusted to your directory structure.
+const lombiqConfig = require('./src/Utilities/Lombiq.NodeJs.Extensions/Lombiq.NodeJs.Extensions/config/.prettierrc.lombiq-base.js');
+
+module.exports = {
+ ...lombiqConfig,
+ // Add custom rules and overrides here.
+}
diff --git a/Directory.Build.props b/Directory.Build.props
index 1523d24cf..961ef70db 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -7,10 +7,11 @@
-
$(MSBuildThisFileDirectory)
$(MSBuildThisFileDirectory)
+ $(MSBuildThisFileDirectory)
diff --git a/Lombiq.OSOCE.sln b/Lombiq.OSOCE.sln
index 4136f2409..5158b8124 100644
--- a/Lombiq.OSOCE.sln
+++ b/Lombiq.OSOCE.sln
@@ -18,6 +18,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
package.json = package.json
Readme.md = Readme.md
Reset-Local.ps1 = Reset-Local.ps1
+ .prettierrc.js = .prettierrc.js
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Modules", "Modules", "{11E06A11-1733-408D-BB2F-BFA07075F812}"
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 29ed7ff4e..7f103d42f 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
@@ -29,7 +29,7 @@
-
+
@@ -47,8 +47,8 @@
-
-
+
+
diff --git a/NuGetTest/src/Lombiq.OSOCE.NuGet.Web/Program.cs b/NuGetTest/src/Lombiq.OSOCE.NuGet.Web/Program.cs
index 564ac2143..30c54fa7f 100644
--- a/NuGetTest/src/Lombiq.OSOCE.NuGet.Web/Program.cs
+++ b/NuGetTest/src/Lombiq.OSOCE.NuGet.Web/Program.cs
@@ -1,5 +1,4 @@
using Microsoft.AspNetCore.Builder;
-using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using OrchardCore.Logging;
using System.Collections.Generic;
@@ -13,20 +12,15 @@
builder.Services
.AddSingleton(configuration)
- .AddOrchardCms(orchardCoreBuilder =>
- {
- orchardCoreBuilder.AuthorizeApiRequestsIfEnabled(configuration);
- orchardCoreBuilder.ConfigureFeaturesGuard(
+ .AddOrchardCms(orchardCoreBuilder => orchardCoreBuilder
+ .AddOrchardCoreApplicationInsightsTelemetry(configuration)
+ .AuthorizeApiRequestsIfEnabled(configuration)
+ .ConfigureFeaturesGuard(
new Dictionary>
{
["OrchardCore.Twitter"] = new[] { "Lombiq.UIKit", "Lombiq.ChartJs" },
- });
-
- if (!configuration.IsUITesting())
- {
- orchardCoreBuilder.AddSetupFeatures("OrchardCore.AutoSetup");
- }
- });
+ })
+ .EnableAutoSetupIfNotUITesting(configuration));
var app = builder.Build();
diff --git a/NuGetTest/src/Modules/Lombiq.OSOCE.NuGet.TestModule/Lombiq.OSOCE.NuGet.TestModule.csproj b/NuGetTest/src/Modules/Lombiq.OSOCE.NuGet.TestModule/Lombiq.OSOCE.NuGet.TestModule.csproj
index 97869c0bf..7cc730af0 100644
--- a/NuGetTest/src/Modules/Lombiq.OSOCE.NuGet.TestModule/Lombiq.OSOCE.NuGet.TestModule.csproj
+++ b/NuGetTest/src/Modules/Lombiq.OSOCE.NuGet.TestModule/Lombiq.OSOCE.NuGet.TestModule.csproj
@@ -16,7 +16,7 @@
-
+
diff --git a/NuGetTest/src/Themes/Lombiq.OSOCE.NuGet.TestTheme/package-lock.json b/NuGetTest/src/Themes/Lombiq.OSOCE.NuGet.TestTheme/package-lock.json
deleted file mode 100644
index 75a4cc6de..000000000
--- a/NuGetTest/src/Themes/Lombiq.OSOCE.NuGet.TestTheme/package-lock.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "name": "Lombiq.OSOCE.NuGet.TestTheme",
- "lockfileVersion": 2,
- "requires": true,
- "packages": {}
-}
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 c5765ecb1..6bea20471 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
@@ -20,7 +20,7 @@
-
+
@@ -34,7 +34,7 @@
-
+
diff --git a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/BasicOrchardFeaturesTests.cs b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/BasicOrchardFeaturesTests.cs
index 2a63b0c39..3c554c4d5 100644
--- a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/BasicOrchardFeaturesTests.cs
+++ b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/BasicOrchardFeaturesTests.cs
@@ -1,6 +1,4 @@
-using Lombiq.Tests.UI.Attributes;
using Lombiq.Tests.UI.Extensions;
-using Lombiq.Tests.UI.Services;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
@@ -14,9 +12,8 @@ public BasicOrchardFeaturesTests(ITestOutputHelper testOutputHelper)
{
}
- [Theory, Chrome]
- public Task BasicOrchardFeaturesShouldWork(Browser browser) =>
+ [Fact]
+ public Task BasicOrchardFeaturesShouldWork() =>
ExecuteTestAsync(
- context => context.TestBasicOrchardFeaturesExceptRegistrationAsync("Lombiq.OSOCE.NuGet.BasicOrchardFeaturesTests"),
- browser);
+ context => context.TestBasicOrchardFeaturesExceptRegistrationAsync("Lombiq.OSOCE.NuGet.BasicOrchardFeaturesTests"));
}
diff --git a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/BehaviorFileUploadTests.cs b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/BehaviorFileUploadTests.cs
index 7c788082b..02863a9dc 100644
--- a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/BehaviorFileUploadTests.cs
+++ b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/BehaviorFileUploadTests.cs
@@ -1,7 +1,5 @@
-using Lombiq.Tests.UI.Attributes;
using Lombiq.Tests.UI.Extensions;
using Lombiq.Tests.UI.Helpers;
-using Lombiq.Tests.UI.Services;
using OpenQA.Selenium;
using Shouldly;
using System.Threading.Tasks;
@@ -17,8 +15,8 @@ public BehaviorFileUploadTests(ITestOutputHelper testOutputHelper)
{
}
- [Theory, Chrome]
- public Task SampleFilesShouldBeAccessible(Browser browser) =>
+ [Fact]
+ public Task SampleFilesShouldBeAccessible() =>
ExecuteTestAfterSetupAsync(
async context =>
{
@@ -29,6 +27,5 @@ public Task SampleFilesShouldBeAccessible(Browser browser) =>
context.Get(By.CssSelector(".message-error"))
.Text
.ShouldContain("Only zip or json files are supported.");
- },
- browser);
+ });
}
diff --git a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/LibraryTests/BehaviorOrchardCoreApiClientTests.cs b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/LibraryTests/BehaviorOrchardCoreApiClientTests.cs
index a77386b54..f1cb6dbc4 100644
--- a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/LibraryTests/BehaviorOrchardCoreApiClientTests.cs
+++ b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/LibraryTests/BehaviorOrchardCoreApiClientTests.cs
@@ -1,6 +1,4 @@
using Lombiq.OrchardCoreApiClient.Tests.UI.Extensions;
-using Lombiq.Tests.UI.Attributes;
-using Lombiq.Tests.UI.Services;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
@@ -14,9 +12,7 @@ public BehaviorOrchardCoreApiClientTests(ITestOutputHelper testOutputHelper)
{
}
- [Theory, Chrome]
- public Task OrchardCoreApiClientShouldWork(Browser browser) =>
- ExecuteTestAfterSetupAsync(
- async context => await context.TestOrchardCoreApiClientBehaviorAsync(),
- browser);
+ [Fact]
+ public Task OrchardCoreApiClientShouldWork() =>
+ ExecuteTestAfterSetupAsync(context => context.TestOrchardCoreApiClientBehaviorAsync());
}
diff --git a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorApplicationInsightsTests.cs b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorApplicationInsightsTests.cs
index 96bcc4aa1..66b45c2a0 100644
--- a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorApplicationInsightsTests.cs
+++ b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorApplicationInsightsTests.cs
@@ -1,6 +1,4 @@
using Lombiq.Hosting.Azure.ApplicationInsights.Tests.UI.TestCases;
-using Lombiq.Tests.UI.Attributes;
-using Lombiq.Tests.UI.Services;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
@@ -14,7 +12,7 @@ public BehaviorApplicationInsightsTests(ITestOutputHelper testOutputHelper)
{
}
- [Theory, Chrome]
- public Task ApplicationInsightsTrackingInOfflineOperationShouldWork(Browser browser) =>
- ApplicationInsightsTestCases.ApplicationInsightsTrackingInOfflineOperationShouldWorkAsync(ExecuteTestAfterSetupAsync, browser);
+ [Fact]
+ public Task ApplicationInsightsTrackingInOfflineOperationShouldWork() =>
+ ApplicationInsightsTestCases.ApplicationInsightsTrackingInOfflineOperationShouldWorkAsync(ExecuteTestAfterSetupAsync);
}
diff --git a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorAsyncEditorTests.cs b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorAsyncEditorTests.cs
index d9580498e..e7ab8032b 100644
--- a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorAsyncEditorTests.cs
+++ b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorAsyncEditorTests.cs
@@ -1,8 +1,6 @@
using Lombiq.ContentEditors.Tests.UI.Extensions;
-using Lombiq.Tests.UI.Attributes;
using Lombiq.Tests.UI.Extensions;
using Lombiq.Tests.UI.Helpers;
-using Lombiq.Tests.UI.Services;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
@@ -16,24 +14,22 @@ public BehaviorAsyncEditorTests(ITestOutputHelper testOutputHelper)
{
}
- [Theory, Chrome]
- public Task DemoContentItemAsyncEditorShouldWork(Browser browser) =>
+ [Fact]
+ public Task DemoContentItemAsyncEditorShouldWork() =>
ExecuteTestAfterSetupAsync(
async context =>
{
await context.SignInDirectlyAsync();
await context.TestDemoContentItemAsyncEditorAsync();
- },
- browser);
+ });
- [Theory, Chrome]
- public Task DemoFrontEndAsyncEditorShouldWork(Browser browser) =>
+ [Fact]
+ public Task DemoFrontEndAsyncEditorShouldWork() =>
ExecuteTestAfterSetupAsync(
async context =>
{
await context.SignInDirectlyAsync();
await context.TestDemoFrontEndAsyncEditorAsync();
},
- browser,
ConfigurationHelper.DisableHtmlValidation);
}
diff --git a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorChartJsTests.cs b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorChartJsTests.cs
index ab59feec1..603127a75 100644
--- a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorChartJsTests.cs
+++ b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorChartJsTests.cs
@@ -1,6 +1,4 @@
using Lombiq.ChartJs.Tests.UI.Extensions;
-using Lombiq.Tests.UI.Attributes;
-using Lombiq.Tests.UI.Services;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
@@ -14,9 +12,7 @@ public BehaviorChartJsTests(ITestOutputHelper testOutputHelper)
{
}
- [Theory, Chrome]
- public Task RecipeDataShouldBeDisplayedCorrectly(Browser browser) =>
- ExecuteTestAfterSetupAsync(
- context => context.TestChartJsSampleBehaviorAsync(),
- browser);
+ [Fact]
+ public Task RecipeDataShouldBeDisplayedCorrectly() =>
+ ExecuteTestAfterSetupAsync(context => context.TestChartJsSampleBehaviorAsync());
}
diff --git a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorDataTableTests.cs b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorDataTableTests.cs
index 42f4dfb95..4a77ae8b9 100644
--- a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorDataTableTests.cs
+++ b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorDataTableTests.cs
@@ -1,6 +1,4 @@
using Lombiq.DataTables.Tests.UI.Extensions;
-using Lombiq.Tests.UI.Attributes;
-using Lombiq.Tests.UI.Services;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
@@ -14,9 +12,6 @@ public BehaviorDataTableTests(ITestOutputHelper testOutputHelper)
{
}
- [Theory, Chrome]
- public Task DataTableShouldWork(Browser browser) =>
- ExecuteTestAfterSetupAsync(
- context => context.TestDataTableRecipeDataAsync(),
- browser);
+ [Fact]
+ public Task DataTableShouldWork() => ExecuteTestAfterSetupAsync(context => context.TestDataTableRecipeDataAsync());
}
diff --git a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorEmailQuotaTests.cs b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorEmailQuotaTests.cs
index 04bf3f3be..51353c09a 100644
--- a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorEmailQuotaTests.cs
+++ b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorEmailQuotaTests.cs
@@ -1,6 +1,4 @@
-using Lombiq.Hosting.Tenants.EmailQuotaManagement.Tests.UI.Extensions;
-using Lombiq.Tests.UI.Attributes;
-using Lombiq.Tests.UI.Services;
+using Lombiq.Hosting.Tenants.EmailQuotaManagement.Tests.UI.Extensions;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
@@ -14,18 +12,16 @@ public BehaviorEmailQuotaTests(ITestOutputHelper testOutputHelper)
{
}
- [Theory, Chrome]
- public Task EmailQuotaShouldBlockEmailsOverLimitAndWarn(Browser browser) =>
+ [Fact]
+ public Task EmailQuotaShouldBlockEmailsOverLimitAndWarn() =>
ExecuteTestAfterSetupAsync(
context => context.TestEmailQuotaManagementBehaviorAsync(10),
- browser,
configuration => configuration.SetEmailQuotaManagementOptionsForUITest(10));
- [Theory, Chrome]
- public Task EmailQuotaShouldNotBlockEmailsWhenDifferentHostIsUsedThanOriginalFromConfig(Browser browser) =>
+ [Fact]
+ public Task EmailQuotaShouldNotBlockEmailsWhenDifferentHostIsUsedThanOriginalFromConfig() =>
ExecuteTestAfterSetupAsync(
context => context.TestEmailQuotaManagementBehaviorAsync(1, moduleShouldInterfere: false),
- browser,
// The default SMTP host is localhost during UI tests, we set it to 127.0.0.1 to be able to send emails,
// but the Email Quota module shouldn't interfere.
configuration => configuration.SetEmailQuotaManagementOptionsForUITest(1, "127.0.0.1"));
diff --git a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorEnvironmentRobotsTests.cs b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorEnvironmentRobotsTests.cs
index 21f80ccea..7c55b7dd3 100644
--- a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorEnvironmentRobotsTests.cs
+++ b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorEnvironmentRobotsTests.cs
@@ -1,6 +1,4 @@
using Lombiq.Hosting.Tenants.EnvironmentRobots.Tests.UI.Extensions;
-using Lombiq.Tests.UI.Attributes;
-using Lombiq.Tests.UI.Services;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
@@ -14,23 +12,20 @@ public BehaviorEnvironmentRobotsTests(ITestOutputHelper testOutputHelper)
{
}
- [Theory, Chrome]
- public Task RobotsMetaTagShouldBeMissing(Browser browser) =>
+ [Fact]
+ public Task RobotsMetaTagShouldBeMissing() =>
ExecuteTestAfterSetupAsync(
- async context => await context.TestRobotMetaTagIsMissingAsync(shouldBeMissing: true),
- browser,
+ context => context.TestRobotMetaTagIsMissingAsync(shouldBeMissing: true),
configuration => configuration.SetEnvironmentRobotsOptionsConfiguration(isProduction: true));
- [Theory, Chrome]
- public Task RobotsMetaTagShouldBeMissingWithoutConfiguration(Browser browser) =>
+ [Fact]
+ public Task RobotsMetaTagShouldBeMissingWithoutConfiguration() =>
ExecuteTestAfterSetupAsync(
- async context => await context.TestRobotMetaTagIsMissingAsync(shouldBeMissing: false),
- browser);
+ context => context.TestRobotMetaTagIsMissingAsync(shouldBeMissing: false));
- [Theory, Chrome]
- public Task RobotsMetaTagShouldBePresent(Browser browser) =>
+ [Fact]
+ public Task RobotsMetaTagShouldBePresent() =>
ExecuteTestAfterSetupAsync(
- async context => await context.TestRobotMetaTagIsMissingAsync(shouldBeMissing: false),
- browser,
+ context => context.TestRobotMetaTagIsMissingAsync(shouldBeMissing: false),
configuration => configuration.SetEnvironmentRobotsOptionsConfiguration(isProduction: false));
}
diff --git a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorFeaturesGuardTests.cs b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorFeaturesGuardTests.cs
index 06c512a92..1b93c7e93 100644
--- a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorFeaturesGuardTests.cs
+++ b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorFeaturesGuardTests.cs
@@ -1,7 +1,5 @@
using Lombiq.Hosting.Tenants.FeaturesGuard.Tests.UI.Extensions;
using Lombiq.OSOCE.NuGet.Tests.UI.Helpers;
-using Lombiq.Tests.UI.Attributes;
-using Lombiq.Tests.UI.Services;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
@@ -18,16 +16,18 @@ public BehaviorFeaturesGuardTests(ITestOutputHelper testOutputHelper)
// HTML validation is disabled as OC's login and dashboard pages contain several errors. See:
// https://github.com/OrchardCMS/OrchardCore/issues/12271
// https://github.com/OrchardCMS/OrchardCore/issues/12271
- [Theory, Chrome]
- public Task ForbiddenFeaturesShouldNotBeActivatableOnTenants(Browser browser) =>
- ExecuteTestAfterSetupAsync(context => context.TestForbiddenFeaturesAsync(SetupHelpers.RecipeId), browser, configuration =>
- configuration.HtmlValidationConfiguration.RunHtmlValidationAssertionOnAllPageChanges = false);
+ [Fact]
+ public Task ForbiddenFeaturesShouldNotBeActivatableOnTenants() =>
+ ExecuteTestAfterSetupAsync(
+ context => context.TestForbiddenFeaturesAsync(SetupHelpers.RecipeId),
+ configuration => configuration.HtmlValidationConfiguration.RunHtmlValidationAssertionOnAllPageChanges = false);
// HTML validation is disabled as OC's login and dashboard pages contain several errors. See:
// https://github.com/OrchardCMS/OrchardCore/issues/12271
// https://github.com/OrchardCMS/OrchardCore/issues/12271
- [Theory, Chrome]
- public Task ConditionallyEnabledFeaturesShouldWorkCorrectlyOnTenants(Browser browser) =>
- ExecuteTestAfterSetupAsync(context => context.TestConditionallyEnabledFeaturesAsync(SetupHelpers.RecipeId), browser, configuration =>
- configuration.HtmlValidationConfiguration.RunHtmlValidationAssertionOnAllPageChanges = false);
+ [Fact]
+ public Task ConditionallyEnabledFeaturesShouldWorkCorrectlyOnTenants() =>
+ ExecuteTestAfterSetupAsync(
+ context => context.TestConditionallyEnabledFeaturesAsync(SetupHelpers.RecipeId),
+ configuration => configuration.HtmlValidationConfiguration.RunHtmlValidationAssertionOnAllPageChanges = false);
}
diff --git a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorHelpfulExtensionsTests.cs b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorHelpfulExtensionsTests.cs
index a610d0d44..7f00f7792 100644
--- a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorHelpfulExtensionsTests.cs
+++ b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorHelpfulExtensionsTests.cs
@@ -1,6 +1,4 @@
using Lombiq.HelpfulExtensions.Tests.UI.Extensions;
-using Lombiq.Tests.UI.Attributes;
-using Lombiq.Tests.UI.Services;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
@@ -14,21 +12,15 @@ public BehaviorHelpfulExtensionsTests(ITestOutputHelper testOutputHelper)
{
}
- [Theory, Chrome]
- public Task FeatureFlow(Browser browser) =>
- ExecuteTestAfterSetupAsync(
- context => context.TestFlowAdditionalStylingPartAsync(),
- browser);
+ [Fact]
+ public Task FeatureFlow() =>
+ ExecuteTestAfterSetupAsync(context => context.TestFlowAdditionalStylingPartAsync());
- [Theory, Chrome]
- public Task FeatureWidgets(Browser browser) =>
- ExecuteTestAfterSetupAsync(
- context => context.TestFeatureWidgetsAsync(),
- browser);
+ [Fact]
+ public Task FeatureWidgets() =>
+ ExecuteTestAfterSetupAsync(context => context.TestFeatureWidgetsAsync());
- [Theory, Chrome]
- public Task FeatureCodeGeneration(Browser browser) =>
- ExecuteTestAfterSetupAsync(
- context => context.TestFeatureCodeGenerationsAsync(),
- browser);
+ [Fact]
+ public Task FeatureCodeGeneration() =>
+ ExecuteTestAfterSetupAsync(context => context.TestFeatureCodeGenerationsAsync());
}
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 836f7e21c..25f56a13a 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,7 +1,5 @@
using Lombiq.Hosting.Tenants.IdleTenantManagement.Tests.UI.Extensions;
-using Lombiq.Tests.UI.Attributes;
using Lombiq.Tests.UI.Extensions;
-using Lombiq.Tests.UI.Services;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
@@ -16,8 +14,8 @@ public IdleTenantTests(ITestOutputHelper testOutputHelper)
{
}
- [Theory, Chrome]
- public Task ShuttingDownIdleTenantsShouldWork(Browser browser) =>
+ [Fact]
+ public Task ShuttingDownIdleTenantsShouldWork() =>
ExecuteTestAfterSetupAsync(
async context =>
{
@@ -28,6 +26,5 @@ public Task ShuttingDownIdleTenantsShouldWork(Browser browser) =>
context.Configuration.AssertAppLogsAsync = webApplicationInstance =>
IdleTenantManagementExtensions.AssertAppLogsWithIdleCheckAsync(webApplicationInstance);
},
- browser,
configuration => configuration.SetMaxIdleMinutesAndLoggingForUITest());
}
diff --git a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorJsonEditorTests.cs b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorJsonEditorTests.cs
index d75fa29b7..2c601a453 100644
--- a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorJsonEditorTests.cs
+++ b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorJsonEditorTests.cs
@@ -1,6 +1,4 @@
using Lombiq.JsonEditor.Tests.UI.Extensions;
-using Lombiq.Tests.UI.Attributes;
-using Lombiq.Tests.UI.Services;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
@@ -14,9 +12,7 @@ public BehaviorJsonEditorTests(ITestOutputHelper testOutputHelper)
{
}
- [Theory, Chrome]
- public Task JsonEditorShouldWorkCorrectly(Browser browser) =>
- ExecuteTestAfterSetupAsync(
- async context => await context.TestJsonEditorBehaviorAsync(),
- browser);
+ [Fact]
+ public Task JsonEditorShouldWorkCorrectly() =>
+ ExecuteTestAfterSetupAsync(context => context.TestJsonEditorBehaviorAsync());
}
diff --git a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorMaintenanceTests.cs b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorMaintenanceTests.cs
index 7d90aa94e..582351c95 100644
--- a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorMaintenanceTests.cs
+++ b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorMaintenanceTests.cs
@@ -1,6 +1,5 @@
using Lombiq.Hosting.Tenants.Maintenance.Tests.UI.Extensions;
-using Lombiq.Tests.UI.Attributes;
-using Lombiq.Tests.UI.Services;
+using Lombiq.OSOCE.NuGet.Tests.UI.Helpers;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
@@ -14,10 +13,18 @@ public BehaviorMaintenanceTests(ITestOutputHelper testOutputHelper)
{
}
- [Theory, Chrome]
- public Task ChangeUserSensitiveContentMaintenanceTaskShouldBeExecutedSuccessfully(Browser browser) =>
- ExecuteTestAfterSetupAsync(
- async context => await context.ChangeUserSensitiveContentMaintenanceExecutionAsync(),
- browser,
+ // This test uses ExecuteTestAsync with a different setup delegate instead of ExecuteTestAfterSetupAsync because the
+ // maintenance does changes to the DB on startup only necessary for this test (like depersonalizing user accounts).
+ // This would occasionally lead to failures in subsequent tests if this was the first test to run and thus create
+ // the DB snapshot after running the setup.
+ [Fact]
+ public Task ChangeUserSensitiveContentMaintenanceTaskShouldBeExecutedSuccessfully() =>
+ ExecuteTestAsync(
+ context => context.ChangeUserSensitiveContentMaintenanceExecutionAsync(),
+ async context =>
+ {
+ var homepageUri = await SetupHelpers.RunSetupAsync(context);
+ return homepageUri;
+ },
configuration => configuration.ChangeUserSensitiveContentMaintenanceConfiguration());
}
diff --git a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorPrivacyTests.cs b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorPrivacyTests.cs
index 7dd6fde25..c26038438 100644
--- a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorPrivacyTests.cs
+++ b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorPrivacyTests.cs
@@ -1,7 +1,5 @@
using Lombiq.Privacy.Tests.UI.Extensions;
-using Lombiq.Tests.UI.Attributes;
using Lombiq.Tests.UI.Extensions;
-using Lombiq.Tests.UI.Services;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
@@ -15,39 +13,35 @@ public BehaviorPrivacyTests(ITestOutputHelper testOutputHelper)
{
}
- [Theory, Chrome]
- public Task ConsentBannerShouldWorkAnonymous(Browser browser) =>
- ExecuteTestAfterSetupAsync(context => context.TestConsentBannerAsync(), browser);
+ [Fact]
+ public Task ConsentBannerShouldWorkAnonymous() =>
+ ExecuteTestAfterSetupAsync(context => context.TestConsentBannerAsync());
- [Theory, Chrome]
- public Task ConsentBannerShouldWorkAdmin(Browser browser) =>
+ [Fact]
+ public Task ConsentBannerShouldWorkAdmin() =>
ExecuteTestAfterSetupAsync(
async context =>
{
await context.SignInDirectlyAsync();
await context.TestConsentBannerAsync();
- },
- browser);
+ });
// This test is for https://github.com/Lombiq/Orchard-Privacy/issues/15
- [Theory, Chrome]
- public async Task ConsentBannerShouldWorkWithRazorAndLiquidBasedThemes(Browser browser)
+ [Fact]
+ public async Task ConsentBannerShouldWorkWithRazorAndLiquidBasedThemes()
{
- // First should work with liquid based theme
- await ExecuteTestAfterSetupAsync(
- context => context.TestConsentBannerWithThemeAsync("TheBlogTheme"),
- browser);
- // Then should work with razor based theme
- await ExecuteTestAfterSetupAsync(
- context => context.TestConsentBannerWithThemeAsync("TheTheme"),
- browser);
+ // First should work with Liquid-based theme.
+ await ExecuteTestAfterSetupAsync(context => context.TestConsentBannerWithThemeAsync("TheBlogTheme"));
+
+ // Then should work with Razor-based theme.
+ await ExecuteTestAfterSetupAsync(context => context.TestConsentBannerWithThemeAsync("TheTheme"));
}
- [Theory, Chrome]
- public Task RegistrationConsentCheckboxShouldWork(Browser browser) =>
- ExecuteTestAfterSetupAsync(context => context.TestRegistrationConsentCheckboxAsync(), browser);
+ [Fact]
+ public Task RegistrationConsentCheckboxShouldWork() =>
+ ExecuteTestAfterSetupAsync(context => context.TestRegistrationConsentCheckboxAsync());
- [Theory, Chrome]
- public Task FormConsentCheckboxShouldWork(Browser browser) =>
- ExecuteTestAfterSetupAsync(context => context.TestPrivacySampleBehaviorAsync(), browser);
+ [Fact]
+ public Task FormConsentCheckboxShouldWork() =>
+ ExecuteTestAfterSetupAsync(context => context.TestPrivacySampleBehaviorAsync());
}
diff --git a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorTenantManagementTests.cs b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorTenantManagementTests.cs
index 88f71aba0..ea4ad3f0f 100644
--- a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorTenantManagementTests.cs
+++ b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorTenantManagementTests.cs
@@ -1,6 +1,4 @@
-using Lombiq.Hosting.Tenants.Management.Tests.UI.Extensions;
-using Lombiq.Tests.UI.Attributes;
-using Lombiq.Tests.UI.Services;
+using Lombiq.Hosting.Tenants.Management.Tests.UI.Extensions;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
@@ -14,9 +12,7 @@ public BehaviorTenantManagementTests(ITestOutputHelper testOutputHelper)
{
}
- [Theory, Chrome]
- public Task TenantShellSettingsEditorShouldSaveSettings(Browser browser) =>
- ExecuteTestAfterSetupAsync(
- async context => await context.TestShellSettingsEditorFeatureAsync(),
- browser);
+ [Fact]
+ public Task TenantShellSettingsEditorShouldSaveSettings() =>
+ ExecuteTestAfterSetupAsync(context => context.TestShellSettingsEditorFeatureAsync());
}
diff --git a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorVueTests.cs b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorVueTests.cs
index 0cdf65c02..470789bca 100644
--- a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorVueTests.cs
+++ b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorVueTests.cs
@@ -1,6 +1,4 @@
-using Lombiq.Tests.UI.Attributes;
using Lombiq.Tests.UI.Extensions;
-using Lombiq.Tests.UI.Services;
using Lombiq.VueJs.Tests.UI.Extensions;
using System.Threading.Tasks;
using Xunit;
@@ -15,13 +13,12 @@ public BehaviorVueTests(ITestOutputHelper testOutputHelper)
{
}
- [Theory, Chrome]
- public Task RecipeDataShouldBeDisplayedCorrectly(Browser browser) =>
+ [Fact]
+ public Task RecipeDataShouldBeDisplayedCorrectly() =>
ExecuteTestAfterSetupAsync(
async context =>
{
await context.SignInDirectlyAsync();
await context.TestVueSampleBehaviorAsync();
- },
- browser);
+ });
}
diff --git a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/RetrievalBuildVersionDisplayTests.cs b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/RetrievalBuildVersionDisplayTests.cs
index f02970679..5bb83b181 100644
--- a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/RetrievalBuildVersionDisplayTests.cs
+++ b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/RetrievalBuildVersionDisplayTests.cs
@@ -1,6 +1,4 @@
using Lombiq.Hosting.BuildVersionDisplay.Tests.UI.Extensions;
-using Lombiq.Tests.UI.Attributes;
-using Lombiq.Tests.UI.Services;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
@@ -14,9 +12,7 @@ public RetrievalBuildVersionDisplayTests(ITestOutputHelper testOutputHelper)
{
}
- [Theory, Chrome]
- public Task BuildVersionShouldBeBeDisplayedCorrectly(Browser browser) =>
- ExecuteTestAfterSetupAsync(
- context => context.TestBuildVersionDisplayAsync(),
- browser);
+ [Fact]
+ public Task BuildVersionShouldBeBeDisplayedCorrectly() =>
+ ExecuteTestAfterSetupAsync(context => context.TestBuildVersionDisplayAsync());
}
diff --git a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/SecurityScanningTests.cs b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/SecurityScanningTests.cs
new file mode 100644
index 000000000..1bb45480c
--- /dev/null
+++ b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/SecurityScanningTests.cs
@@ -0,0 +1,27 @@
+using Lombiq.Tests.UI.SecurityScanning;
+using Shouldly;
+using System.Threading.Tasks;
+using Xunit;
+using Xunit.Abstractions;
+
+namespace Lombiq.OSOCE.NuGet.Tests.UI.Tests;
+
+public class SecurityScanningTests : UITestBase
+{
+ public SecurityScanningTests(ITestOutputHelper testOutputHelper)
+ : base(testOutputHelper)
+ {
+ }
+
+ // Only scanning the homepage, since this is just to make sure that ZAP still works from NuGet.
+ [Fact]
+ public Task BasicSecurityScanShouldPass() =>
+ ExecuteTestAfterSetupAsync(
+ context => context.RunAndAssertBaselineSecurityScanAsync(
+ configuration => configuration.ExcludeUrlWithRegex(".*:[0-9]+\\/.+"),
+ // We expect 5 alerts from ZAP. This is using "less than" not to fail the test, should ZAP be a bit
+ // inconsistent, which it can be (see https://www.zaproxy.org/faq/why-can-zap-scans-be-inconsistent/).
+ // If this starts failing after some update, then inspect the scan report in the failure dump to see if
+ // the alerts can be simply expected and this number should be increased.
+ sarifLog => sarifLog.Runs[0].Results.Count.ShouldBeLessThan(6)));
+}
diff --git a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ThemeTests/BehaviorMediaThemeTests.cs b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ThemeTests/BehaviorMediaThemeTests.cs
index 32b1b524e..a53f7d04f 100644
--- a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ThemeTests/BehaviorMediaThemeTests.cs
+++ b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ThemeTests/BehaviorMediaThemeTests.cs
@@ -1,6 +1,4 @@
using Lombiq.Hosting.MediaTheme.Tests.UI.Extensions;
-using Lombiq.Tests.UI.Attributes;
-using Lombiq.Tests.UI.Services;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
@@ -14,9 +12,7 @@ public BehaviorMediaThemeTests(ITestOutputHelper testOutputHelper)
{
}
- [Theory, Chrome]
- public Task MediaThemeShouldRenderTemplatesFromMediaLibrary(Browser browser) =>
- ExecuteTestAfterSetupAsync(
- context => context.TestMediaThemeTemplateRenderingBehaviorAsync(),
- browser);
+ [Fact]
+ public Task MediaThemeShouldRenderTemplatesFromMediaLibrary() =>
+ ExecuteTestAfterSetupAsync(context => context.TestMediaThemeTemplateRenderingBehaviorAsync());
}
diff --git a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ThemeTests/BehaviorThemeTests.cs b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ThemeTests/BehaviorThemeTests.cs
index 9f8ca9c3d..1039e8577 100644
--- a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ThemeTests/BehaviorThemeTests.cs
+++ b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ThemeTests/BehaviorThemeTests.cs
@@ -1,7 +1,5 @@
using Lombiq.BaseTheme.Tests.UI.Extensions;
-using Lombiq.Tests.UI.Attributes;
using Lombiq.Tests.UI.Extensions;
-using Lombiq.Tests.UI.Services;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
@@ -15,8 +13,8 @@ public BehaviorThemeTests(ITestOutputHelper testOutputHelper)
{
}
- [Theory, Chrome]
- public Task BaseThemeShouldWork(Browser browser) =>
+ [Fact]
+ public Task BaseThemeShouldWork() =>
ExecuteTestAfterSetupAsync(
async context =>
{
@@ -25,6 +23,5 @@ public Task BaseThemeShouldWork(Browser browser) =>
await context.GoToHomePageAsync(onlyIfNotAlreadyThere: false);
await context.TestBaseThemeFeaturesAsync();
- },
- browser);
+ });
}
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 ba38657b8..c08ab31f9 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
@@ -5,7 +5,7 @@
-
+
diff --git a/src/Libraries/Lombiq.HelpfulLibraries b/src/Libraries/Lombiq.HelpfulLibraries
index 631402016..8db1b9b0a 160000
--- a/src/Libraries/Lombiq.HelpfulLibraries
+++ b/src/Libraries/Lombiq.HelpfulLibraries
@@ -1 +1 @@
-Subproject commit 6314020166aae8b6bda0ca56cfc3d18bcd44b699
+Subproject commit 8db1b9b0a30b60ce1c2615b12abf621916cc03af
diff --git a/src/Libraries/Lombiq.OrchardCoreApiClient b/src/Libraries/Lombiq.OrchardCoreApiClient
index ff4b4e8ed..e80a01111 160000
--- a/src/Libraries/Lombiq.OrchardCoreApiClient
+++ b/src/Libraries/Lombiq.OrchardCoreApiClient
@@ -1 +1 @@
-Subproject commit ff4b4e8ed8d35167648a264ec9b191f0de741418
+Subproject commit e80a01111801097103311dc5db50353449698977
diff --git a/src/Lombiq.OSOCE.Web/Program.cs b/src/Lombiq.OSOCE.Web/Program.cs
index bf5c5f91d..cf8386ad7 100644
--- a/src/Lombiq.OSOCE.Web/Program.cs
+++ b/src/Lombiq.OSOCE.Web/Program.cs
@@ -1,5 +1,4 @@
using Microsoft.AspNetCore.Builder;
-using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using OrchardCore.Logging;
using System.Collections.Generic;
@@ -16,19 +15,18 @@
// create UI tests check out the project.
builder.Services
.AddSingleton(configuration)
- .AddOrchardCms(orchardCoreBuilder =>
- {
- orchardCoreBuilder.ConfigureFeaturesGuard(
+ .AddOrchardCms(orchardCoreBuilder => orchardCoreBuilder
+ .AddOrchardCoreApplicationInsightsTelemetry(configuration)
+ .ConfigureFeaturesGuard(
new Dictionary>
{
- ["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();
diff --git a/src/Lombiq.OSOCE.Web/appsettings.json b/src/Lombiq.OSOCE.Web/appsettings.json
index 0f431a681..aefef8a2d 100644
--- a/src/Lombiq.OSOCE.Web/appsettings.json
+++ b/src/Lombiq.OSOCE.Web/appsettings.json
@@ -1,4 +1,8 @@
{
+ "ApplicationInsights": {
+ // Add the ConnectionString if you'd like to use the Application Insights module.
+ //"ConnectionString": "your connection string comes here"
+ },
"Logging": {
"IncludeScopes": false,
"LogLevel": {
@@ -12,10 +16,6 @@
}
},
"OrchardCore": {
- "ApplicationInsights": {
- // Fill this out if you'd like to use the Application Insights module.
- "ConnectionString": "your connection string comes here"
- },
"Lombiq_Hosting_Azure_ApplicationInsights": {
// Fill this out if you'd like to use the Application Insights module.
"QuickPulseTelemetryModuleAuthenticationApiKey": "your API key here",
diff --git a/src/Modules/Lombiq.ContentEditors b/src/Modules/Lombiq.ContentEditors
index e671c47f2..035be9120 160000
--- a/src/Modules/Lombiq.ContentEditors
+++ b/src/Modules/Lombiq.ContentEditors
@@ -1 +1 @@
-Subproject commit e671c47f293c9918a76171ded688cc9905b44a2c
+Subproject commit 035be9120e1dc94363aac48b80378a43cd489c05
diff --git a/src/Modules/Lombiq.DataTables b/src/Modules/Lombiq.DataTables
index 3e2bf91dc..eb4a401a3 160000
--- a/src/Modules/Lombiq.DataTables
+++ b/src/Modules/Lombiq.DataTables
@@ -1 +1 @@
-Subproject commit 3e2bf91dc4e10fea7dbbb65132e6b38856ee91cd
+Subproject commit eb4a401a3dcd807a8eda00af897c8ded7e1fd355
diff --git a/src/Modules/Lombiq.HelpfulExtensions b/src/Modules/Lombiq.HelpfulExtensions
index 9f0a7a310..304839f94 160000
--- a/src/Modules/Lombiq.HelpfulExtensions
+++ b/src/Modules/Lombiq.HelpfulExtensions
@@ -1 +1 @@
-Subproject commit 9f0a7a3100ce00323513cb7a41a1d4f4e3b4e7c3
+Subproject commit 304839f94364c84208007663aee7a795cf08dbf3
diff --git a/src/Modules/Lombiq.Hosting.Azure.ApplicationInsights b/src/Modules/Lombiq.Hosting.Azure.ApplicationInsights
index bd27c548b..275f1530b 160000
--- a/src/Modules/Lombiq.Hosting.Azure.ApplicationInsights
+++ b/src/Modules/Lombiq.Hosting.Azure.ApplicationInsights
@@ -1 +1 @@
-Subproject commit bd27c548bfba91b50b963b6e03bfe5f6e6c8e9ef
+Subproject commit 275f1530b1aadaf972db07e2e3528fb297f24bac
diff --git a/src/Modules/Lombiq.Hosting.BuildVersionDisplay b/src/Modules/Lombiq.Hosting.BuildVersionDisplay
index 6562e28d9..156197700 160000
--- a/src/Modules/Lombiq.Hosting.BuildVersionDisplay
+++ b/src/Modules/Lombiq.Hosting.BuildVersionDisplay
@@ -1 +1 @@
-Subproject commit 6562e28d90d45671e92f49fb028d4ffe3f7027a9
+Subproject commit 156197700ccb97c02bda22a449f807a35e359893
diff --git a/src/Modules/Lombiq.Hosting.Tenants b/src/Modules/Lombiq.Hosting.Tenants
index b7e10758c..adb4e3f8e 160000
--- a/src/Modules/Lombiq.Hosting.Tenants
+++ b/src/Modules/Lombiq.Hosting.Tenants
@@ -1 +1 @@
-Subproject commit b7e10758c00bb8617cb8035a796066da228b98b4
+Subproject commit adb4e3f8efb809d06d3d08946b1f188c9e62ffde
diff --git a/src/Modules/Lombiq.JsonEditor b/src/Modules/Lombiq.JsonEditor
index b8a42878c..438073ca3 160000
--- a/src/Modules/Lombiq.JsonEditor
+++ b/src/Modules/Lombiq.JsonEditor
@@ -1 +1 @@
-Subproject commit b8a42878c72480e7ec6624e5e1161e57ac803b63
+Subproject commit 438073ca3031f410ce10000d8b83f5a5e592d9b0
diff --git a/src/Modules/Lombiq.TrainingDemo b/src/Modules/Lombiq.TrainingDemo
index a961b39eb..b5611dfeb 160000
--- a/src/Modules/Lombiq.TrainingDemo
+++ b/src/Modules/Lombiq.TrainingDemo
@@ -1 +1 @@
-Subproject commit a961b39ebab34730eb56c3c7108d2c83b4b02a3e
+Subproject commit b5611dfeb1245a5b260dc2f879507319c027e62e
diff --git a/src/Modules/Lombiq.UIKit b/src/Modules/Lombiq.UIKit
index 104761058..73237b482 160000
--- a/src/Modules/Lombiq.UIKit
+++ b/src/Modules/Lombiq.UIKit
@@ -1 +1 @@
-Subproject commit 10476105828bac2a40f1ec18338762d591792d56
+Subproject commit 73237b48259ee731c8063524a9bc451e41efce5f
diff --git a/src/Modules/Lombiq.VueJs b/src/Modules/Lombiq.VueJs
index dea650e29..c68aab990 160000
--- a/src/Modules/Lombiq.VueJs
+++ b/src/Modules/Lombiq.VueJs
@@ -1 +1 @@
-Subproject commit dea650e296b96a342b6b47ce90858be20fd36288
+Subproject commit c68aab9906fd98f372e002d9bc54c734d7c74bc1
diff --git a/src/Themes/Lombiq.BaseTheme b/src/Themes/Lombiq.BaseTheme
index 7ba7ed88c..938d3d4a5 160000
--- a/src/Themes/Lombiq.BaseTheme
+++ b/src/Themes/Lombiq.BaseTheme
@@ -1 +1 @@
-Subproject commit 7ba7ed88ca017034d7f4d0ef687ff31ed48b8c41
+Subproject commit 938d3d4a5771821ba9b9c5a563176f1f987567f7
diff --git a/src/Themes/Lombiq.Hosting.MediaTheme b/src/Themes/Lombiq.Hosting.MediaTheme
index 51fecb153..8ab1ee746 160000
--- a/src/Themes/Lombiq.Hosting.MediaTheme
+++ b/src/Themes/Lombiq.Hosting.MediaTheme
@@ -1 +1 @@
-Subproject commit 51fecb153a7ca5c0cf08b45e9f2c5ebbd0bd0186
+Subproject commit 8ab1ee74648c8edfed9ffdfc14bfd35f87d94401
diff --git a/src/Utilities/Lombiq.NodeJs.Extensions b/src/Utilities/Lombiq.NodeJs.Extensions
index 5e24f37a7..b7cec8b05 160000
--- a/src/Utilities/Lombiq.NodeJs.Extensions
+++ b/src/Utilities/Lombiq.NodeJs.Extensions
@@ -1 +1 @@
-Subproject commit 5e24f37a7f62e0e8e93a334300b5c6a0b6c3bc4e
+Subproject commit b7cec8b05ab1e6282e9a42d2c6194ef7a0f61369
diff --git a/test/Lombiq.OSOCE.Tests.UI/Lombiq.OSOCE.Tests.UI.csproj b/test/Lombiq.OSOCE.Tests.UI/Lombiq.OSOCE.Tests.UI.csproj
index a9460c670..50160a573 100644
--- a/test/Lombiq.OSOCE.Tests.UI/Lombiq.OSOCE.Tests.UI.csproj
+++ b/test/Lombiq.OSOCE.Tests.UI/Lombiq.OSOCE.Tests.UI.csproj
@@ -14,6 +14,7 @@
all
runtime; build; native; contentfiles; analyzers; buildtransitive
+
diff --git a/test/Lombiq.OSOCE.Tests.UI/Tests/LibraryTests/BehaviorOrchardCoreApiClientTests.cs b/test/Lombiq.OSOCE.Tests.UI/Tests/LibraryTests/BehaviorOrchardCoreApiClientTests.cs
index ad5daa748..5c33107a2 100644
--- a/test/Lombiq.OSOCE.Tests.UI/Tests/LibraryTests/BehaviorOrchardCoreApiClientTests.cs
+++ b/test/Lombiq.OSOCE.Tests.UI/Tests/LibraryTests/BehaviorOrchardCoreApiClientTests.cs
@@ -1,6 +1,4 @@
using Lombiq.OrchardCoreApiClient.Tests.UI.Extensions;
-using Lombiq.Tests.UI.Attributes;
-using Lombiq.Tests.UI.Services;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
@@ -14,9 +12,7 @@ public BehaviorOrchardCoreApiClientTests(ITestOutputHelper testOutputHelper)
{
}
- [Theory, Chrome]
- public Task OrchardCoreApiClientShouldWork(Browser browser) =>
- ExecuteTestAfterSetupAsync(
- async context => await context.TestOrchardCoreApiClientBehaviorAsync(),
- browser);
+ [Fact]
+ public Task OrchardCoreApiClientShouldWork() =>
+ ExecuteTestAfterSetupAsync(context => context.TestOrchardCoreApiClientBehaviorAsync());
}
diff --git a/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorApplicationInsightsTests.cs b/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorApplicationInsightsTests.cs
index 47491b375..83b33e80b 100644
--- a/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorApplicationInsightsTests.cs
+++ b/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorApplicationInsightsTests.cs
@@ -1,6 +1,4 @@
using Lombiq.Hosting.Azure.ApplicationInsights.Tests.UI.TestCases;
-using Lombiq.Tests.UI.Attributes;
-using Lombiq.Tests.UI.Services;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
@@ -14,7 +12,7 @@ public BehaviorApplicationInsightsTests(ITestOutputHelper testOutputHelper)
{
}
- [Theory, Chrome]
- public Task ApplicationInsightsTrackingInOfflineOperationShouldWork(Browser browser) =>
- ApplicationInsightsTestCases.ApplicationInsightsTrackingInOfflineOperationShouldWorkAsync(ExecuteTestAfterSetupAsync, browser);
+ [Fact]
+ public Task ApplicationInsightsTrackingInOfflineOperationShouldWork() =>
+ ApplicationInsightsTestCases.ApplicationInsightsTrackingInOfflineOperationShouldWorkAsync(ExecuteTestAfterSetupAsync);
}
diff --git a/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorAsyncEditorTests.cs b/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorAsyncEditorTests.cs
index 148ee4904..8562ee6da 100644
--- a/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorAsyncEditorTests.cs
+++ b/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorAsyncEditorTests.cs
@@ -1,8 +1,6 @@
using Lombiq.ContentEditors.Tests.UI.Extensions;
-using Lombiq.Tests.UI.Attributes;
using Lombiq.Tests.UI.Extensions;
using Lombiq.Tests.UI.Helpers;
-using Lombiq.Tests.UI.Services;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
@@ -16,24 +14,22 @@ public BehaviorAsyncEditorTests(ITestOutputHelper testOutputHelper)
{
}
- [Theory, Chrome]
- public Task DemoContentItemAsyncEditorShouldWork(Browser browser) =>
+ [Fact]
+ public Task DemoContentItemAsyncEditorShouldWork() =>
ExecuteTestAfterSetupAsync(
async context =>
{
await context.SignInDirectlyAsync();
await context.TestDemoContentItemAsyncEditorAsync();
- },
- browser);
+ });
- [Theory, Chrome]
- public Task DemoFrontEndAsyncEditorShouldWork(Browser browser) =>
+ [Fact]
+ public Task DemoFrontEndAsyncEditorShouldWork() =>
ExecuteTestAfterSetupAsync(
async context =>
{
await context.SignInDirectlyAsync();
await context.TestDemoFrontEndAsyncEditorAsync();
},
- browser,
ConfigurationHelper.DisableHtmlValidation);
}
diff --git a/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorChartJsTests.cs b/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorChartJsTests.cs
index 921432cb1..f27d2a10a 100644
--- a/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorChartJsTests.cs
+++ b/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorChartJsTests.cs
@@ -1,6 +1,4 @@
using Lombiq.ChartJs.Tests.UI.Extensions;
-using Lombiq.Tests.UI.Attributes;
-using Lombiq.Tests.UI.Services;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
@@ -14,9 +12,7 @@ public BehaviorChartJsTests(ITestOutputHelper testOutputHelper)
{
}
- [Theory, Chrome]
- public Task RecipeDataShouldBeDisplayedCorrectly(Browser browser) =>
- ExecuteTestAfterSetupAsync(
- context => context.TestChartJsSampleBehaviorAsync(),
- browser);
+ [Fact]
+ public Task RecipeDataShouldBeDisplayedCorrectly() =>
+ ExecuteTestAfterSetupAsync(context => context.TestChartJsSampleBehaviorAsync());
}
diff --git a/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorEmailQuotaTests.cs b/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorEmailQuotaTests.cs
index 22f4c8dfa..26fdc8def 100644
--- a/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorEmailQuotaTests.cs
+++ b/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorEmailQuotaTests.cs
@@ -1,6 +1,4 @@
using Lombiq.Hosting.Tenants.EmailQuotaManagement.Tests.UI.Extensions;
-using Lombiq.Tests.UI.Attributes;
-using Lombiq.Tests.UI.Services;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
@@ -14,18 +12,16 @@ public BehaviorEmailQuotaTests(ITestOutputHelper testOutputHelper)
{
}
- [Theory, Chrome]
- public Task EmailQuotaShouldBlockEmailsOverLimitAndWarn(Browser browser) =>
+ [Fact]
+ public Task EmailQuotaShouldBlockEmailsOverLimitAndWarn() =>
ExecuteTestAfterSetupAsync(
context => context.TestEmailQuotaManagementBehaviorAsync(10),
- browser,
configuration => configuration.SetEmailQuotaManagementOptionsForUITest(10));
- [Theory, Chrome]
- public Task EmailQuotaShouldNotBlockEmailsWhenDifferentHostIsUsedThanOriginalFromConfig(Browser browser) =>
+ [Fact]
+ public Task EmailQuotaShouldNotBlockEmailsWhenDifferentHostIsUsedThanOriginalFromConfig() =>
ExecuteTestAfterSetupAsync(
context => context.TestEmailQuotaManagementBehaviorAsync(1, moduleShouldInterfere: false),
- browser,
// The default SMTP host is localhost during UI tests, we set it to 127.0.0.1 to be able to send emails,
// but the Email Quota module shouldn't interfere.
configuration => configuration.SetEmailQuotaManagementOptionsForUITest(1, "127.0.0.1"));
diff --git a/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorEnvironmentRobotsTests.cs b/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorEnvironmentRobotsTests.cs
index 682520fbb..98e7cf628 100644
--- a/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorEnvironmentRobotsTests.cs
+++ b/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorEnvironmentRobotsTests.cs
@@ -1,6 +1,4 @@
using Lombiq.Hosting.Tenants.EnvironmentRobots.Tests.UI.Extensions;
-using Lombiq.Tests.UI.Attributes;
-using Lombiq.Tests.UI.Services;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
@@ -14,23 +12,20 @@ public BehaviorEnvironmentRobotsTests(ITestOutputHelper testOutputHelper)
{
}
- [Theory, Chrome]
- public Task RobotsMetaTagShouldBeMissing(Browser browser) =>
+ [Fact]
+ public Task RobotsMetaTagShouldBeMissing() =>
ExecuteTestAfterSetupAsync(
- async context => await context.TestRobotMetaTagIsMissingAsync(shouldBeMissing: true),
- browser,
+ context => context.TestRobotMetaTagIsMissingAsync(shouldBeMissing: true),
configuration => configuration.SetEnvironmentRobotsOptionsConfiguration(isProduction: true));
- [Theory, Chrome]
- public Task RobotsMetaTagShouldBeMissingWithoutConfiguration(Browser browser) =>
+ [Fact]
+ public Task RobotsMetaTagShouldBeMissingWithoutConfiguration() =>
ExecuteTestAfterSetupAsync(
- async context => await context.TestRobotMetaTagIsMissingAsync(shouldBeMissing: false),
- browser);
+ context => context.TestRobotMetaTagIsMissingAsync(shouldBeMissing: false));
- [Theory, Chrome]
- public Task RobotsMetaTagShouldBePresent(Browser browser) =>
+ [Fact]
+ public Task RobotsMetaTagShouldBePresent() =>
ExecuteTestAfterSetupAsync(
- async context => await context.TestRobotMetaTagIsMissingAsync(shouldBeMissing: false),
- browser,
+ context => context.TestRobotMetaTagIsMissingAsync(shouldBeMissing: false),
configuration => configuration.SetEnvironmentRobotsOptionsConfiguration(isProduction: false));
}
diff --git a/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorFeaturesGuardTests.cs b/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorFeaturesGuardTests.cs
index 22a6076da..78337b7b7 100644
--- a/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorFeaturesGuardTests.cs
+++ b/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorFeaturesGuardTests.cs
@@ -1,8 +1,6 @@
using Lombiq.Hosting.Tenants.FeaturesGuard.Tests.UI.Extensions;
-using Lombiq.Tests.UI.Attributes;
using Lombiq.Tests.UI.Helpers;
using Lombiq.Tests.UI.Samples.Helpers;
-using Lombiq.Tests.UI.Services;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
@@ -18,19 +16,17 @@ public BehaviorFeaturesGuardTests(ITestOutputHelper testOutputHelper)
// HTML validation is disabled as OC's login and dashboard pages contain several errors. See:
// https://github.com/OrchardCMS/OrchardCore/issues/12271
- [Theory, Chrome]
- public Task ForbiddenFeaturesShouldNotBeActivatableOnTenants(Browser browser) =>
+ [Fact]
+ public Task ForbiddenFeaturesShouldNotBeActivatableOnTenants() =>
ExecuteTestAfterSetupAsync(
context => context.TestForbiddenFeaturesAsync(SetupHelpers.RecipeId),
- browser,
ConfigurationHelper.DisableHtmlValidation);
// HTML validation is disabled as OC's login and dashboard pages contain several errors. See:
// https://github.com/OrchardCMS/OrchardCore/issues/12271
- [Theory, Chrome]
- public Task ConditionallyEnabledFeaturesShouldWorkCorrectlyOnTenants(Browser browser) =>
+ [Fact]
+ public Task ConditionallyEnabledFeaturesShouldWorkCorrectlyOnTenants() =>
ExecuteTestAfterSetupAsync(
context => context.TestConditionallyEnabledFeaturesAsync(SetupHelpers.RecipeId),
- browser,
ConfigurationHelper.DisableHtmlValidation);
}
diff --git a/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorHelpfulExtensionsTests.cs b/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorHelpfulExtensionsTests.cs
index e69c9c51e..b4532c0bc 100644
--- a/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorHelpfulExtensionsTests.cs
+++ b/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorHelpfulExtensionsTests.cs
@@ -1,6 +1,4 @@
using Lombiq.HelpfulExtensions.Tests.UI.Extensions;
-using Lombiq.Tests.UI.Attributes;
-using Lombiq.Tests.UI.Services;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
@@ -14,27 +12,15 @@ public BehaviorHelpfulExtensionsTests(ITestOutputHelper testOutputHelper)
{
}
- [Theory, Chrome]
- public Task FeatureFlow(Browser browser) =>
- ExecuteTestAfterSetupAsync(
- context => context.TestFlowAdditionalStylingPartAsync(),
- browser);
+ [Fact]
+ public Task FeatureFlow() => ExecuteTestAfterSetupAsync(context => context.TestFlowAdditionalStylingPartAsync());
- [Theory, Chrome]
- public Task FeatureWidgets(Browser browser) =>
- ExecuteTestAfterSetupAsync(
- context => context.TestFeatureWidgetsAsync(),
- browser);
+ [Fact]
+ public Task FeatureWidgets() => ExecuteTestAfterSetupAsync(context => context.TestFeatureWidgetsAsync());
- [Theory, Chrome]
- public Task FeatureCodeGeneration(Browser browser) =>
- ExecuteTestAfterSetupAsync(
- context => context.TestFeatureCodeGenerationsAsync(),
- browser);
+ [Fact]
+ public Task FeatureCodeGeneration() => ExecuteTestAfterSetupAsync(context => context.TestFeatureCodeGenerationsAsync());
- [Theory, Chrome]
- public Task FeatureContentSets(Browser browser) =>
- ExecuteTestAfterSetupAsync(
- context => context.TestFeatureContentSetsAsync(),
- browser);
+ [Fact]
+ public Task FeatureContentSets() => ExecuteTestAfterSetupAsync(context => context.TestFeatureContentSetsAsync());
}
diff --git a/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorIdleTenantsTests.cs b/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorIdleTenantsTests.cs
index c0fa1db9b..fc4a5c4bf 100644
--- a/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorIdleTenantsTests.cs
+++ b/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorIdleTenantsTests.cs
@@ -1,7 +1,5 @@
using Lombiq.Hosting.Tenants.IdleTenantManagement.Tests.UI.Extensions;
-using Lombiq.Tests.UI.Attributes;
using Lombiq.Tests.UI.Extensions;
-using Lombiq.Tests.UI.Services;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
@@ -15,8 +13,8 @@ public BehaviorIdleTenantsTests(ITestOutputHelper testOutputHelper)
{
}
- [Theory, Chrome]
- public Task ShuttingDownIdleTenantsShouldWork(Browser browser) =>
+ [Fact]
+ public Task ShuttingDownIdleTenantsShouldWork() =>
ExecuteTestAfterSetupAsync(
async context =>
{
@@ -30,6 +28,5 @@ public Task ShuttingDownIdleTenantsShouldWork(Browser browser) =>
await IdleTenantManagementExtensions.AssertAppLogsWithIdleCheckAsync(webApplicationInstance);
};
},
- browser,
configuration => configuration.SetMaxIdleMinutesAndLoggingForUITest());
}
diff --git a/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorJsonEditorTests.cs b/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorJsonEditorTests.cs
index 7b5bb6e3d..a02cf91fc 100644
--- a/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorJsonEditorTests.cs
+++ b/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorJsonEditorTests.cs
@@ -1,6 +1,4 @@
using Lombiq.JsonEditor.Tests.UI.Extensions;
-using Lombiq.Tests.UI.Attributes;
-using Lombiq.Tests.UI.Services;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
@@ -14,9 +12,7 @@ public BehaviorJsonEditorTests(ITestOutputHelper testOutputHelper)
{
}
- [Theory, Chrome]
- public Task JsonEditorShouldWorkCorrectly(Browser browser) =>
- ExecuteTestAfterSetupAsync(
- async context => await context.TestJsonEditorBehaviorAsync(),
- browser);
+ [Fact]
+ public Task JsonEditorShouldWorkCorrectly() =>
+ ExecuteTestAfterSetupAsync(context => context.TestJsonEditorBehaviorAsync());
}
diff --git a/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorMaintenanceTests.cs b/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorMaintenanceTests.cs
index db4a5445c..aece66944 100644
--- a/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorMaintenanceTests.cs
+++ b/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorMaintenanceTests.cs
@@ -1,6 +1,5 @@
using Lombiq.Hosting.Tenants.Maintenance.Tests.UI.Extensions;
-using Lombiq.Tests.UI.Attributes;
-using Lombiq.Tests.UI.Services;
+using Lombiq.Tests.UI.Samples.Helpers;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
@@ -14,24 +13,30 @@ public BehaviorMaintenanceTests(ITestOutputHelper testOutputHelper)
{
}
- [Theory, Chrome]
- public Task MaintenanceTaskShouldBeExecutedSuccessfully(Browser browser) =>
+ [Fact]
+ public Task MaintenanceTaskShouldBeExecutedSuccessfully() =>
ExecuteTestAfterSetupAsync(
- async context => await context.TestSiteUrlMaintenanceExecutionAsync(),
- browser,
+ context => context.TestSiteUrlMaintenanceExecutionAsync(),
configuration => configuration.SetUpdateSiteUrlMaintenanceConfiguration());
- [Theory, Chrome]
- public Task AddSiteOwnerPermissionToRoleMaintenanceTaskShouldBeExecutedSuccessfully(Browser browser) =>
+ [Fact]
+ public Task AddSiteOwnerPermissionToRoleMaintenanceTaskShouldBeExecutedSuccessfully() =>
ExecuteTestAfterSetupAsync(
- async context => await context.TestSiteOwnerPermissionToRoleMaintenanceExecutionAsync(),
- browser,
+ context => context.TestSiteOwnerPermissionToRoleMaintenanceExecutionAsync(),
configuration => configuration.SetAddSiteOwnerPermissionToRoleMaintenanceConfiguration());
- [Theory, Chrome]
- public Task ChangeUserSensitiveContentMaintenanceTaskShouldBeExecutedSuccessfully(Browser browser) =>
- ExecuteTestAfterSetupAsync(
- async context => await context.ChangeUserSensitiveContentMaintenanceExecutionAsync(),
- browser,
+ // This test uses ExecuteTestAsync with a different setup delegate instead of ExecuteTestAfterSetupAsync because the
+ // maintenance does changes to the DB on startup only necessary for this test (like depersonalizing user accounts).
+ // This would occasionally lead to failures in subsequent tests if this was the first test to run and thus create
+ // the DB snapshot after running the setup.
+ [Fact]
+ public Task ChangeUserSensitiveContentMaintenanceTaskShouldBeExecutedSuccessfully() =>
+ ExecuteTestAsync(
+ context => context.ChangeUserSensitiveContentMaintenanceExecutionAsync(),
+ async context =>
+ {
+ var homepageUri = await SetupHelpers.RunSetupAsync(context);
+ return homepageUri;
+ },
configuration => configuration.ChangeUserSensitiveContentMaintenanceConfiguration());
}
diff --git a/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorMediaStorageManagementTests.cs b/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorMediaStorageManagementTests.cs
index 9edfe8b52..929ddbb84 100644
--- a/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorMediaStorageManagementTests.cs
+++ b/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorMediaStorageManagementTests.cs
@@ -1,6 +1,4 @@
using Lombiq.Hosting.Tenants.MediaStorageManagement.Tests.UI.Extensions;
-using Lombiq.Tests.UI.Attributes;
-using Lombiq.Tests.UI.Services;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
@@ -14,11 +12,10 @@ public BehaviorMediaStorageManagementTests(ITestOutputHelper testOutputHelper)
{
}
- [Theory, Chrome]
- public Task MediaQuotaShouldWork(Browser browser) =>
+ [Fact]
+ public Task MediaQuotaShouldWork() =>
ExecuteTestAfterSetupAsync(
- async context => await context.TestMediaStorageManagementBehaviorAsync(),
- browser,
+ context => context.TestMediaStorageManagementBehaviorAsync(),
// Setting maximum storage quota for 50 000 bytes to see if it fails with the sample png file.
configuration => configuration.SetMediaStorageManagementOptionsForUITest(50_000));
}
diff --git a/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorPrivacyTests.cs b/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorPrivacyTests.cs
index c7fbb26ba..d01ed360f 100644
--- a/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorPrivacyTests.cs
+++ b/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorPrivacyTests.cs
@@ -1,7 +1,5 @@
using Lombiq.Privacy.Tests.UI.Extensions;
-using Lombiq.Tests.UI.Attributes;
using Lombiq.Tests.UI.Extensions;
-using Lombiq.Tests.UI.Services;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
@@ -15,39 +13,36 @@ public BehaviorPrivacyTests(ITestOutputHelper testOutputHelper)
{
}
- [Theory, Chrome]
- public Task ConsentBannerShouldWorkAnonymous(Browser browser) =>
- ExecuteTestAfterSetupAsync(context => context.TestConsentBannerAsync(), browser);
+ [Fact]
+ public Task ConsentBannerShouldWorkAnonymous() =>
+ ExecuteTestAfterSetupAsync(context => context.TestConsentBannerAsync());
- [Theory, Chrome]
- public Task ConsentBannerShouldWorkAdmin(Browser browser) =>
+ [Fact]
+ public Task ConsentBannerShouldWorkAdmin() =>
ExecuteTestAfterSetupAsync(
async context =>
{
await context.SignInDirectlyAsync();
await context.TestConsentBannerAsync();
- },
- browser);
+ });
// This test is for https://github.com/Lombiq/Orchard-Privacy/issues/15
- [Theory, Chrome]
- public async Task ConsentBannerShouldWorkWithRazorAndLiquidBasedThemes(Browser browser)
+ [Fact]
+ public async Task ConsentBannerShouldWorkWithRazorAndLiquidBasedThemes()
{
// First should work with Liquid-based theme
await ExecuteTestAfterSetupAsync(
- context => context.TestConsentBannerWithThemeAsync("TheBlogTheme"),
- browser);
+ context => context.TestConsentBannerWithThemeAsync("TheBlogTheme"));
// Then should work with Razor-based theme
await ExecuteTestAfterSetupAsync(
- context => context.TestConsentBannerWithThemeAsync("TheTheme"),
- browser);
+ context => context.TestConsentBannerWithThemeAsync("TheTheme"));
}
- [Theory, Chrome]
- public Task RegistrationConsentCheckboxShouldWork(Browser browser) =>
- ExecuteTestAfterSetupAsync(context => context.TestRegistrationConsentCheckboxAsync(), browser);
+ [Fact]
+ public Task RegistrationConsentCheckboxShouldWork() =>
+ ExecuteTestAfterSetupAsync(context => context.TestRegistrationConsentCheckboxAsync());
- [Theory, Chrome]
- public Task FormConsentCheckboxShouldWork(Browser browser) =>
- ExecuteTestAfterSetupAsync(context => context.TestPrivacySampleBehaviorAsync(), browser);
+ [Fact]
+ public Task FormConsentCheckboxShouldWork() =>
+ ExecuteTestAfterSetupAsync(context => context.TestPrivacySampleBehaviorAsync());
}
diff --git a/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorTenantManagementTests.cs b/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorTenantManagementTests.cs
index 1bd36d7cd..2bf5540d2 100644
--- a/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorTenantManagementTests.cs
+++ b/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorTenantManagementTests.cs
@@ -1,6 +1,4 @@
using Lombiq.Hosting.Tenants.Management.Tests.UI.Extensions;
-using Lombiq.Tests.UI.Attributes;
-using Lombiq.Tests.UI.Services;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
@@ -14,9 +12,7 @@ public BehaviorTenantManagementTests(ITestOutputHelper testOutputHelper)
{
}
- [Theory, Chrome]
- public Task TenantShellSettingsEditorShouldSaveSettings(Browser browser) =>
- ExecuteTestAfterSetupAsync(
- async context => await context.TestShellSettingsEditorFeatureAsync(),
- browser);
+ [Fact]
+ public Task TenantShellSettingsEditorShouldSaveSettings() =>
+ ExecuteTestAfterSetupAsync(context => context.TestShellSettingsEditorFeatureAsync());
}
diff --git a/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorUIKitShowcaseTests.cs b/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorUIKitShowcaseTests.cs
index 10c8c8a26..844dc43d6 100644
--- a/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorUIKitShowcaseTests.cs
+++ b/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorUIKitShowcaseTests.cs
@@ -1,6 +1,4 @@
-using Lombiq.Tests.UI.Attributes;
using Lombiq.Tests.UI.Extensions;
-using Lombiq.Tests.UI.Services;
using Lombiq.UIKit.Tests.UI.Extensions;
using Shouldly;
using System;
@@ -18,11 +16,10 @@ public BehaviorUIKitShowcaseTests(ITestOutputHelper testOutputHelper)
{
}
- [Theory, Chrome]
- public Task UIKitShowcasePageShouldBeCorrect(Browser browser)
+ [Fact]
+ public Task UIKitShowcasePageShouldBeCorrect()
=> ExecuteTestAfterSetupAsync(
context => context.TestUIKitShowcaseBehaviorAsync(),
- browser,
configuration => configuration.HtmlValidationConfiguration.AssertHtmlValidationResultAsync =
async validationResult =>
{
diff --git a/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorVueTests.cs b/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorVueTests.cs
index 9ced7fb2e..3ef76468f 100644
--- a/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorVueTests.cs
+++ b/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorVueTests.cs
@@ -1,5 +1,4 @@
using Atata.HtmlValidation;
-using Lombiq.Tests.UI.Attributes;
using Lombiq.Tests.UI.Extensions;
using Lombiq.Tests.UI.Services;
using Lombiq.VueJs.Samples.Controllers;
@@ -20,32 +19,29 @@ public BehaviorVueTests(ITestOutputHelper testOutputHelper)
{
}
- [Theory, Chrome]
- public Task RecipeDataShouldBeDisplayedCorrectly(Browser browser) =>
+ [Fact]
+ public Task RecipeDataShouldBeDisplayedCorrectly() =>
ExecuteTestAfterSetupAsync(
async context =>
{
await context.SignInDirectlyAsync();
await context.TestVueSampleBehaviorAsync();
- },
- browser);
+ });
- [Theory, Chrome]
- public Task QrCardScanShouldWorkAsync(Browser browser) =>
+ [Fact]
+ public Task QrCardScanShouldWorkAsync() =>
ExecuteTestAfterSetupAsync(
context => context.TestQrCardFoundAsync(),
- browser,
configuration =>
{
configuration.BrowserConfiguration.ConfigureFakeVideoSourceForPositiveTest();
configuration.HtmlValidationConfiguration.AssertHtmlValidationResultAsync = AssertHtmValidationResultAsync;
});
- [Theory, Chrome]
- public Task QrCardScanShouldReportNotFoundAsync(Browser browser) =>
+ [Fact]
+ public Task QrCardScanShouldReportNotFoundAsync() =>
ExecuteTestAfterSetupAsync(
context => context.TestQrCardNotFoundAsync(),
- browser,
configuration =>
{
configuration.BrowserConfiguration.ConfigureFakeVideoSourceForNegativeTest();
diff --git a/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/RetrievalBuildVersionDisplayTests.cs b/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/RetrievalBuildVersionDisplayTests.cs
index 6b9ceac39..b94283da7 100644
--- a/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/RetrievalBuildVersionDisplayTests.cs
+++ b/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/RetrievalBuildVersionDisplayTests.cs
@@ -1,6 +1,4 @@
using Lombiq.Hosting.BuildVersionDisplay.Tests.UI.Extensions;
-using Lombiq.Tests.UI.Attributes;
-using Lombiq.Tests.UI.Services;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
@@ -14,9 +12,7 @@ public RetrievalBuildVersionDisplayTests(ITestOutputHelper testOutputHelper)
{
}
- [Theory, Chrome]
- public Task BuildVersionShouldBeBeDisplayedCorrectly(Browser browser) =>
- ExecuteTestAfterSetupAsync(
- context => context.TestBuildVersionDisplayAsync(),
- browser);
+ [Fact]
+ public Task BuildVersionShouldBeBeDisplayedCorrectly() =>
+ ExecuteTestAfterSetupAsync(context => context.TestBuildVersionDisplayAsync());
}
diff --git a/test/Lombiq.OSOCE.Tests.UI/Tests/RetrievalDataTablesTests.cs b/test/Lombiq.OSOCE.Tests.UI/Tests/RetrievalDataTablesTests.cs
index 3b748ba8c..2c1fec783 100644
--- a/test/Lombiq.OSOCE.Tests.UI/Tests/RetrievalDataTablesTests.cs
+++ b/test/Lombiq.OSOCE.Tests.UI/Tests/RetrievalDataTablesTests.cs
@@ -1,6 +1,4 @@
using Lombiq.DataTables.Tests.UI.Extensions;
-using Lombiq.Tests.UI.Attributes;
-using Lombiq.Tests.UI.Services;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
@@ -14,9 +12,7 @@ public BehaviorDataTablesTests(ITestOutputHelper testOutputHelper)
{
}
- [Theory, Chrome]
- public Task RecipeDataShouldBeDisplayedCorrectly(Browser browser) =>
- ExecuteTestAfterSetupAsync(
- context => context.TestDataTableRecipeDataAsync(),
- browser);
+ [Fact]
+ public Task RecipeDataShouldBeDisplayedCorrectly() =>
+ ExecuteTestAfterSetupAsync(context => context.TestDataTableRecipeDataAsync());
}
diff --git a/test/Lombiq.OSOCE.Tests.UI/Tests/ThemeTests/BehaviorBaseThemeTests.cs b/test/Lombiq.OSOCE.Tests.UI/Tests/ThemeTests/BehaviorBaseThemeTests.cs
index 0dd26d2bd..a5afaaaea 100644
--- a/test/Lombiq.OSOCE.Tests.UI/Tests/ThemeTests/BehaviorBaseThemeTests.cs
+++ b/test/Lombiq.OSOCE.Tests.UI/Tests/ThemeTests/BehaviorBaseThemeTests.cs
@@ -1,7 +1,5 @@
-using Lombiq.BaseTheme.Tests.UI.Extensions;
-using Lombiq.Tests.UI.Attributes;
+using Lombiq.BaseTheme.Tests.UI.Extensions;
using Lombiq.Tests.UI.Extensions;
-using Lombiq.Tests.UI.Services;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
@@ -15,8 +13,8 @@ public BehaviorBaseThemeTests(ITestOutputHelper testOutputHelper)
{
}
- [Theory, Chrome]
- public Task ThemeFeaturesShouldWork(Browser browser) =>
+ [Fact]
+ public Task ThemeFeaturesShouldWork() =>
ExecuteTestAfterSetupAsync(
async context =>
{
@@ -25,6 +23,5 @@ public Task ThemeFeaturesShouldWork(Browser browser) =>
await context.SignInDirectlyAsync();
await context.TestBaseThemeSiteSettingsAsync();
- },
- browser);
+ });
}
diff --git a/test/Lombiq.OSOCE.Tests.UI/Tests/ThemeTests/BehaviorMediaThemeTests.cs b/test/Lombiq.OSOCE.Tests.UI/Tests/ThemeTests/BehaviorMediaThemeTests.cs
index 8ec7bd216..f1f42a0af 100644
--- a/test/Lombiq.OSOCE.Tests.UI/Tests/ThemeTests/BehaviorMediaThemeTests.cs
+++ b/test/Lombiq.OSOCE.Tests.UI/Tests/ThemeTests/BehaviorMediaThemeTests.cs
@@ -1,6 +1,4 @@
using Lombiq.Hosting.MediaTheme.Tests.UI.Extensions;
-using Lombiq.Tests.UI.Attributes;
-using Lombiq.Tests.UI.Services;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
@@ -14,9 +12,7 @@ public BehaviorMediaThemeTests(ITestOutputHelper testOutputHelper)
{
}
- [Theory, Chrome]
- public Task MediaThemeShouldRenderTemplatesFromMediaLibrary(Browser browser) =>
- ExecuteTestAfterSetupAsync(
- context => context.TestMediaThemeTemplateRenderingBehaviorAsync(),
- browser);
+ [Fact]
+ public Task MediaThemeShouldRenderTemplatesFromMediaLibrary() =>
+ ExecuteTestAfterSetupAsync(context => context.TestMediaThemeTemplateRenderingBehaviorAsync());
}
diff --git a/test/Lombiq.OSOCE.Tests.UI/Tests/ThemeTests/BlogBaseThemeTests.cs b/test/Lombiq.OSOCE.Tests.UI/Tests/ThemeTests/BlogBaseThemeTests.cs
index 4cb4c0ecd..1d78f6651 100644
--- a/test/Lombiq.OSOCE.Tests.UI/Tests/ThemeTests/BlogBaseThemeTests.cs
+++ b/test/Lombiq.OSOCE.Tests.UI/Tests/ThemeTests/BlogBaseThemeTests.cs
@@ -1,6 +1,5 @@
-using Lombiq.BaseTheme.Tests.UI.Extensions;
+using Lombiq.BaseTheme.Tests.UI.Extensions;
using Lombiq.OSOCE.Tests.UI.Helpers;
-using Lombiq.Tests.UI.Attributes;
using Lombiq.Tests.UI.Extensions;
using Lombiq.Tests.UI.Services;
using OpenQA.Selenium;
@@ -22,8 +21,8 @@ public BlogBehaviorBaseThemeTests(ITestOutputHelper testOutputHelper)
{
}
- [Theory, Chrome]
- public Task ThemeWithoutSetupShouldWork(Browser browser) =>
+ [Fact]
+ public Task ThemeWithoutSetupShouldWork() =>
ExecuteTestAfterSetupAndThemeSwitchAsync(
async context =>
{
@@ -35,23 +34,20 @@ public Task ThemeWithoutSetupShouldWork(Browser browser) =>
await context.SignInDirectlyAndGoToHomepageAsync();
context.TestBlogRecipeMenuItemsAddedToMainMenu();
- },
- browser);
+ });
- [Theory, Chrome]
- public Task ContentMenuItemShouldWorkCorrectly(Browser browser) =>
+ [Fact]
+ public Task ContentMenuItemShouldWorkCorrectly() =>
ExecuteTestAfterSetupAndThemeSwitchAsync(
async context =>
{
await context.SignInDirectlyAsync();
await context.TestAddingMenuItemToBlogMainMenuAsync();
- },
- browser);
+ });
- private Task ExecuteTestAfterSetupAndThemeSwitchAsync(Func testAsync, Browser browser) =>
+ private Task ExecuteTestAfterSetupAndThemeSwitchAsync(Func testAsync) =>
ExecuteTestAsync(
testAsync,
- browser,
async context =>
{
var homePageUri = await SetupHelpers.RunBlogSetupAsync(context);
@@ -72,7 +68,5 @@ await context.ClickReliablyOnAsync(By.CssSelector(
// Disable HTML validation, because we have no control over the HTML in the Blog and the content added
// by the Blog recipe.
configuration.HtmlValidationConfiguration.RunHtmlValidationAssertionOnAllPageChanges = false;
-
- return Task.CompletedTask;
});
}
diff --git a/test/Lombiq.OSOCE.Tests.UI/Tests/UITestingToolboxTests/CustomAdminPrefixTests.cs b/test/Lombiq.OSOCE.Tests.UI/Tests/UITestingToolboxTests/CustomAdminPrefixTests.cs
index a5e972ca4..3a7138f35 100644
--- a/test/Lombiq.OSOCE.Tests.UI/Tests/UITestingToolboxTests/CustomAdminPrefixTests.cs
+++ b/test/Lombiq.OSOCE.Tests.UI/Tests/UITestingToolboxTests/CustomAdminPrefixTests.cs
@@ -1,5 +1,3 @@
-using Lombiq.Tests.UI.Attributes;
-using Lombiq.Tests.UI.Services;
using Lombiq.Tests.UI.Tests.UI.TestCases;
using System.Threading.Tasks;
using Xunit;
@@ -14,7 +12,7 @@ public CustomAdminPrefixTests(ITestOutputHelper testOutputHelper)
{
}
- [Theory, Chrome]
- public Task NavigationWithCustomAdminPrefixShouldWork(Browser browser) =>
- CustomAdminPrefixTestCases.NavigationWithCustomAdminPrefixShouldWorkAsync(ExecuteTestAfterSetupAsync, browser);
+ [Fact]
+ public Task NavigationWithCustomAdminPrefixShouldWork() =>
+ CustomAdminPrefixTestCases.NavigationWithCustomAdminPrefixShouldWorkAsync(ExecuteTestAfterSetupAsync);
}
diff --git a/test/Lombiq.OSOCE.Tests.UI/Tests/UITestingToolboxTests/SecurityShortcutsTests.cs b/test/Lombiq.OSOCE.Tests.UI/Tests/UITestingToolboxTests/SecurityShortcutsTests.cs
index b834426c3..57c2eac35 100644
--- a/test/Lombiq.OSOCE.Tests.UI/Tests/UITestingToolboxTests/SecurityShortcutsTests.cs
+++ b/test/Lombiq.OSOCE.Tests.UI/Tests/UITestingToolboxTests/SecurityShortcutsTests.cs
@@ -1,5 +1,3 @@
-using Lombiq.Tests.UI.Attributes;
-using Lombiq.Tests.UI.Services;
using Lombiq.Tests.UI.Tests.UI.TestCases;
using System.Threading.Tasks;
using Xunit;
@@ -14,15 +12,15 @@ public SecurityShortcutsTests(ITestOutputHelper testOutputHelper)
{
}
- [Theory, Chrome]
- public Task AddUserToRoleShouldWork(Browser browser) =>
- SecurityShortcutsTestCases.AddUserToRoleShouldWorkAsync(ExecuteTestAfterSetupAsync, browser);
+ [Fact]
+ public Task AddUserToRoleShouldWork() =>
+ SecurityShortcutsTestCases.AddUserToRoleShouldWorkAsync(ExecuteTestAfterSetupAsync);
- [Theory, Chrome]
- public Task AddUserToFakeRoleShouldThrow(Browser browser) =>
- SecurityShortcutsTestCases.AddUserToFakeRoleShouldThrowAsync(ExecuteTestAfterSetupAsync, browser);
+ [Fact]
+ public Task AddUserToFakeRoleShouldThrow() =>
+ SecurityShortcutsTestCases.AddUserToFakeRoleShouldThrowAsync(ExecuteTestAfterSetupAsync);
- [Theory, Chrome]
- public Task AllowFakePermissionToRoleShouldThrow(Browser browser) =>
- SecurityShortcutsTestCases.AllowFakePermissionToRoleShouldThrowAsync(ExecuteTestAfterSetupAsync, browser);
+ [Fact]
+ public Task AllowFakePermissionToRoleShouldThrow() =>
+ SecurityShortcutsTestCases.AllowFakePermissionToRoleShouldThrowAsync(ExecuteTestAfterSetupAsync);
}
diff --git a/test/Lombiq.OSOCE.Tests.UI/Tests/UITestingToolboxTests/WorkflowShortcutsTests.cs b/test/Lombiq.OSOCE.Tests.UI/Tests/UITestingToolboxTests/WorkflowShortcutsTests.cs
index 1ff29a321..4e4561311 100644
--- a/test/Lombiq.OSOCE.Tests.UI/Tests/UITestingToolboxTests/WorkflowShortcutsTests.cs
+++ b/test/Lombiq.OSOCE.Tests.UI/Tests/UITestingToolboxTests/WorkflowShortcutsTests.cs
@@ -1,5 +1,3 @@
-using Lombiq.Tests.UI.Attributes;
-using Lombiq.Tests.UI.Services;
using Lombiq.Tests.UI.Tests.UI.TestCases;
using System.Threading.Tasks;
using Xunit;
@@ -14,7 +12,7 @@ public WorkflowShortcutsTests(ITestOutputHelper testOutputHelper)
{
}
- [Theory, Chrome]
- public Task GenerateHttpEventUrlShouldWork(Browser browser) =>
- WorkflowShortcutsTestCases.GenerateHttpEventUrlShouldWorkAsync(ExecuteTestAfterSetupAsync, browser);
+ [Fact]
+ public Task GenerateHttpEventUrlShouldWork() =>
+ WorkflowShortcutsTestCases.GenerateHttpEventUrlShouldWorkAsync(ExecuteTestAfterSetupAsync);
}
diff --git a/test/Lombiq.OSOCE.Tests.UI/Tests/VisualVerificationTests/VisualVerificationTests.cs b/test/Lombiq.OSOCE.Tests.UI/Tests/VisualVerificationTests/VisualVerificationTests.cs
index bb1a12c30..15858d96e 100644
--- a/test/Lombiq.OSOCE.Tests.UI/Tests/VisualVerificationTests/VisualVerificationTests.cs
+++ b/test/Lombiq.OSOCE.Tests.UI/Tests/VisualVerificationTests/VisualVerificationTests.cs
@@ -1,7 +1,5 @@
-using Lombiq.Tests.UI.Attributes;
using Lombiq.Tests.UI.Constants;
using Lombiq.Tests.UI.Extensions;
-using Lombiq.Tests.UI.Services;
using OpenQA.Selenium;
using SixLabors.ImageSharp;
using System.Runtime.InteropServices;
@@ -23,14 +21,13 @@ public VisualVerificationTests(ITestOutputHelper testOutputHelper)
{
}
- [Theory, Chrome]
- public Task VerifyHomePageAndLayout(Browser browser) =>
+ [Fact]
+ public Task VerifyHomePageAndLayout() =>
// Check the whole page so we can verify the margins and to see if header/footer is affected.
ExecuteTestAfterSetupAsync(
context => context.AssertVisualVerificationOnAllResolutions(
_visualVerificationSizes,
_ => By.TagName("body"),
configurator: configuration => configuration.WithFileNameSuffix(
- RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "Windows" : "Unix")),
- browser);
+ RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "Windows" : "Unix")));
}
diff --git a/test/Lombiq.OSOCE.Tests.UI/Tests/VisualVerificationTests/VisualVerificationTests_VerifyHomePageAndLayout_By_TagName_-body-Unix.png b/test/Lombiq.OSOCE.Tests.UI/Tests/VisualVerificationTests/VisualVerificationTests_VerifyHomePageAndLayout_By_TagName_-body-Unix.png
index 76c783ad7..4c6be16e5 100644
Binary files a/test/Lombiq.OSOCE.Tests.UI/Tests/VisualVerificationTests/VisualVerificationTests_VerifyHomePageAndLayout_By_TagName_-body-Unix.png and b/test/Lombiq.OSOCE.Tests.UI/Tests/VisualVerificationTests/VisualVerificationTests_VerifyHomePageAndLayout_By_TagName_-body-Unix.png differ
diff --git a/test/Lombiq.OSOCE.Tests.UI/Tests/VisualVerificationTests/VisualVerificationTests_VerifyHomePageAndLayout_By_TagName_-body-Windows.png b/test/Lombiq.OSOCE.Tests.UI/Tests/VisualVerificationTests/VisualVerificationTests_VerifyHomePageAndLayout_By_TagName_-body-Windows.png
index 415c2975a..22540d37a 100644
Binary files a/test/Lombiq.OSOCE.Tests.UI/Tests/VisualVerificationTests/VisualVerificationTests_VerifyHomePageAndLayout_By_TagName_-body-Windows.png and b/test/Lombiq.OSOCE.Tests.UI/Tests/VisualVerificationTests/VisualVerificationTests_VerifyHomePageAndLayout_By_TagName_-body-Windows.png differ
diff --git a/test/Lombiq.OSOCE.Tests.UI/xunit.runner.json b/test/Lombiq.OSOCE.Tests.UI/xunit.runner.json
new file mode 100644
index 000000000..633a63291
--- /dev/null
+++ b/test/Lombiq.OSOCE.Tests.UI/xunit.runner.json
@@ -0,0 +1,6 @@
+{
+ "$schema": "https://xunit.net/schema/current/xunit.runner.schema.json",
+ "parallelizeAssembly": false,
+ "parallelizeTestCollections": true,
+ "stopOnFail": true
+}
diff --git a/test/Lombiq.UITestingToolbox b/test/Lombiq.UITestingToolbox
index a1a4cde1d..ef5b9e814 160000
--- a/test/Lombiq.UITestingToolbox
+++ b/test/Lombiq.UITestingToolbox
@@ -1 +1 @@
-Subproject commit a1a4cde1dbe0b03c7ca69fecbb879e21acf0e015
+Subproject commit ef5b9e814f0b3649caa566560550608eca8f7b7f
diff --git a/tools/Lombiq.Analyzers.PowerShell b/tools/Lombiq.Analyzers.PowerShell
index ec4d78845..2d83bfe82 160000
--- a/tools/Lombiq.Analyzers.PowerShell
+++ b/tools/Lombiq.Analyzers.PowerShell
@@ -1 +1 @@
-Subproject commit ec4d788458af53eda4b8a6f0642e89da5a3ae78e
+Subproject commit 2d83bfe82451f664059a1bad252deefe8c14a31e
diff --git a/tools/Lombiq.GitHub.Actions b/tools/Lombiq.GitHub.Actions
index a15b38967..e97046f36 160000
--- a/tools/Lombiq.GitHub.Actions
+++ b/tools/Lombiq.GitHub.Actions
@@ -1 +1 @@
-Subproject commit a15b389677f1ed6185a2099dcbc682db704d1f79
+Subproject commit e97046f366b01fdd05dd33d1e828694628cec40b