Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into issue/NEST-113
Browse files Browse the repository at this point in the history
  • Loading branch information
DemeSzabolcs committed Dec 20, 2023
2 parents 208a7c2 + ac8d632 commit 5b32e65
Show file tree
Hide file tree
Showing 83 changed files with 358 additions and 466 deletions.
1 change: 1 addition & 0 deletions .github/actions/spelling/allow.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Overconstrained
parallelizable
qrcode
retriable
Runtimes
sanitizers
scrollbars
shortcutting
Expand Down
3 changes: 3 additions & 0 deletions .github/actions/spelling/excludes.txt
Original file line number Diff line number Diff line change
@@ -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$
Expand Down
20 changes: 16 additions & 4 deletions .github/workflows/build-and-test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -30,46 +30,58 @@ 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"
set-up-azurite: "true"
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.
if: github.ref_name == github.event.repository.default_branch
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
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,24 @@ 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.
if: github.ref_name == github.event.repository.default_branch
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"
Expand All @@ -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"
Expand Down
7 changes: 7 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -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.
}
3 changes: 2 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
</PropertyGroup>

<PropertyGroup>
<!-- Instruct Node.js Extensions to create .eslintrc and .stylelintrc files in the current directory, which is the
<!-- Instruct Node.js Extensions to create .eslintrc, .stylelintrc and .prettierrc files in the current directory, which is the
solution root directory. -->
<NodeJsExtensionsGlobalESLintConfigurationDirectory>$(MSBuildThisFileDirectory)</NodeJsExtensionsGlobalESLintConfigurationDirectory>
<NodeJsExtensionsGlobalStylelintConfigurationDirectory>$(MSBuildThisFileDirectory)</NodeJsExtensionsGlobalStylelintConfigurationDirectory>
<NodeJsExtensionsGlobalPrettierStyleConfigurationDirectory>$(MSBuildThisFileDirectory)</NodeJsExtensionsGlobalPrettierStyleConfigurationDirectory>
</PropertyGroup>

<!-- Copying the Lombiq logo as an icon to all NuGet-published projects. -->
Expand Down
1 change: 1 addition & 0 deletions Lombiq.OSOCE.sln
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<PackageReference Include="Lombiq.DataTables" Version="7.0.2-alpha.0.osoe-638" />
<PackageReference Include="Lombiq.DataTables.Samples" Version="7.0.2-alpha.0.osoe-638" />
<PackageReference Include="Lombiq.HelpfulExtensions" Version="7.0.2" />
<PackageReference Include="Lombiq.Hosting.Azure.ApplicationInsights" Version="7.0.1-alpha.0.osoe-638" />
<PackageReference Include="Lombiq.Hosting.Azure.ApplicationInsights" Version="7.0.2-alpha.1.osoe-733" />
<PackageReference Include="Lombiq.Hosting.BuildVersionDisplay" Version="4.0.1-alpha.0.osoe-638" />
<PackageReference Include="Lombiq.Hosting.MediaTheme" Version="5.0.1-alpha.0.osoe-638" />
<PackageReference Include="Lombiq.Hosting.MediaTheme.Bridge" Version="5.0.1-alpha.0.osoe-638" />
Expand All @@ -47,8 +47,8 @@
<PackageReference Include="Lombiq.Privacy" Version="7.0.2-alpha.2.osoe-638" />
<PackageReference Include="Lombiq.Privacy.Samples" Version="7.0.2-alpha.2.osoe-638" />
<PackageReference Include="Lombiq.SetupExtensions" Version="5.0.0" />
<PackageReference Include="Lombiq.Tests.UI.AppExtensions" Version="8.1.0-alpha.1.osoe-638" />
<PackageReference Include="Lombiq.Tests.UI.Shortcuts" Version="8.1.0-alpha.1.osoe-638" />
<PackageReference Include="Lombiq.Tests.UI.AppExtensions" Version="8.2.1-alpha.6.osoe-351" />
<PackageReference Include="Lombiq.Tests.UI.Shortcuts" Version="8.2.1-alpha.6.osoe-351" />
<PackageReference Include="Lombiq.UIKit" Version="6.0.1-alpha.0.osoe-638" />
<PackageReference Include="Lombiq.VueJs" Version="3.0.1-alpha.0.osoe-638" />
<PackageReference Include="Lombiq.VueJs.Samples" Version="3.0.1-alpha.0.osoe-638" />
Expand Down
18 changes: 6 additions & 12 deletions NuGetTest/src/Lombiq.OSOCE.NuGet.Web/Program.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using OrchardCore.Logging;
using System.Collections.Generic;
Expand All @@ -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<string, IEnumerable<string>>
{
["OrchardCore.Twitter"] = new[] { "Lombiq.UIKit", "Lombiq.ChartJs" },
});

if (!configuration.IsUITesting())
{
orchardCoreBuilder.AddSetupFeatures("OrchardCore.AutoSetup");
}
});
})
.EnableAutoSetupIfNotUITesting(configuration));

var app = builder.Build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Lombiq.HelpfulLibraries" Version="8.0.2" />
<PackageReference Include="Lombiq.HelpfulLibraries" Version="8.1.0" />
<PackageReference Include="OrchardCore.Module.Targets" Version="1.7.0" />
<PackageReference Include="OrchardCore.ContentManagement" Version="1.7.0" />
<PackageReference Include="OrchardCore.ContentTypes.Abstractions" Version="1.7.0" />
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<PackageReference Include="Lombiq.ChartJs.Tests.UI" Version="6.0.2-alpha.0.osoe-638" />
<PackageReference Include="Lombiq.ContentEditors.Tests.UI" Version="2.0.1-alpha.0.osoe-638" />
<PackageReference Include="Lombiq.DataTables.Tests.UI" Version="7.0.2-alpha.0.osoe-638" />
<PackageReference Include="Lombiq.Hosting.Azure.ApplicationInsights.Tests.UI" Version="7.0.1-alpha.0.osoe-638" />
<PackageReference Include="Lombiq.Hosting.Azure.ApplicationInsights.Tests.UI" Version="7.0.2-alpha.1.osoe-733" />
<PackageReference Include="Lombiq.Hosting.BuildVersionDisplay.Tests.UI" Version="4.0.1-alpha.0.osoe-638" />
<PackageReference Include="Lombiq.Hosting.MediaTheme.Tests.UI" Version="5.0.1-alpha.0.osoe-638" />
<PackageReference Include="Lombiq.Hosting.Tenants.EnvironmentRobots.Tests.UI" Version="6.3.0-alpha.2.lmbq-249" />
Expand All @@ -34,7 +34,7 @@
<PackageReference Include="Lombiq.OrchardCoreApiClient.Tests.UI" Version="4.0.1-alpha.0.osoe-638" />
<PackageReference Include="Lombiq.Privacy.Tests.UI" Version="7.0.2-alpha.2.osoe-638" />
<PackageReference Include="Lombiq.HelpfulExtensions.Tests.UI" Version="7.0.2-alpha.2.osoe-683" />
<PackageReference Include="Lombiq.Tests.UI" Version="8.2.1-alpha.0.nest-462" />
<PackageReference Include="Lombiq.Tests.UI" Version="8.2.1-alpha.6.osoe-351" />
<PackageReference Include="Lombiq.VueJs.Tests.UI" Version="3.0.1-alpha.0.osoe-638" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.1">
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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"));
}
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -17,8 +15,8 @@ public BehaviorFileUploadTests(ITestOutputHelper testOutputHelper)
{
}

[Theory, Chrome]
public Task SampleFilesShouldBeAccessible(Browser browser) =>
[Fact]
public Task SampleFilesShouldBeAccessible() =>
ExecuteTestAfterSetupAsync(
async context =>
{
Expand All @@ -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);
});
}
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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());
}
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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);
}
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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);
}
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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());
}
Loading

0 comments on commit 5b32e65

Please sign in to comment.