Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSOE-815: Update packages in Lombiq.UITestingToolbox #928

Closed
wants to merge 13 commits into from
Closed
22 changes: 11 additions & 11 deletions NuGetTest/src/Lombiq.OSOCE.NuGet.Web/Lombiq.OSOCE.NuGet.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,28 +29,28 @@
<PackageReference Include="Lombiq.DataTables" Version="10.0.0" />
<PackageReference Include="Lombiq.DataTables.Samples" Version="10.0.0" />
<PackageReference Include="Lombiq.HelpfulExtensions" Version="10.0.0" />
<PackageReference Include="Lombiq.HelpfulLibraries" Version="12.0.0" />
<PackageReference Include="Lombiq.HelpfulLibraries" Version="12.0.1-alpha.0.osoe-815" />
<PackageReference Include="Lombiq.Hosting.Azure.ApplicationInsights" Version="10.0.0" />
<PackageReference Include="Lombiq.Hosting.BuildVersionDisplay" Version="7.0.0" />
<PackageReference Include="Lombiq.Hosting.MediaTheme" Version="8.0.0" />
<PackageReference Include="Lombiq.Hosting.MediaTheme.Bridge" Version="8.0.0" />
<PackageReference Include="Lombiq.Hosting.MediaTheme.Targets" Version="8.0.0" />
<PackageReference Include="Lombiq.Hosting.Tenants.Admin.Login" Version="9.0.0" />
<PackageReference Include="Lombiq.Hosting.Tenants.EnvironmentRobots" Version="9.0.0" />
<PackageReference Include="Lombiq.Hosting.Tenants.FeaturesGuard" Version="9.0.0" />
<PackageReference Include="Lombiq.Hosting.Tenants.IdleTenantManagement" Version="9.0.0" />
<PackageReference Include="Lombiq.Hosting.Tenants.Maintenance" Version="9.0.0" />
<PackageReference Include="Lombiq.Hosting.Tenants.Management" Version="9.0.0" />
<PackageReference Include="Lombiq.Hosting.Tenants.MediaStorageManagement" Version="9.0.0" />
<PackageReference Include="Lombiq.Hosting.Tenants.EmailQuotaManagement" Version="9.0.0" />
<PackageReference Include="Lombiq.Hosting.Tenants.Admin.Login" Version="9.0.1-alpha.1.osoe-815" />
<PackageReference Include="Lombiq.Hosting.Tenants.EnvironmentRobots" Version="9.0.1-alpha.1.osoe-815" />
<PackageReference Include="Lombiq.Hosting.Tenants.FeaturesGuard" Version="9.0.1-alpha.1.osoe-815" />
<PackageReference Include="Lombiq.Hosting.Tenants.IdleTenantManagement" Version="9.0.1-alpha.1.osoe-815" />
<PackageReference Include="Lombiq.Hosting.Tenants.Maintenance" Version="9.0.1-alpha.1.osoe-815" />
<PackageReference Include="Lombiq.Hosting.Tenants.Management" Version="9.0.1-alpha.1.osoe-815" />
<PackageReference Include="Lombiq.Hosting.Tenants.MediaStorageManagement" Version="9.0.1-alpha.1.osoe-815" />
<PackageReference Include="Lombiq.Hosting.Tenants.EmailQuotaManagement" Version="9.0.1-alpha.1.osoe-815" />
<PackageReference Include="Lombiq.JsonEditor" Version="9.0.0" />
<PackageReference Include="Lombiq.JsonEditor.Tests.UI" Version="9.0.0" />
<PackageReference Include="Lombiq.LoginAsAnybody" Version="5.0.0" />
<PackageReference Include="Lombiq.Privacy" Version="10.0.0" />
<PackageReference Include="Lombiq.Privacy.Samples" Version="10.0.0" />
<PackageReference Include="Lombiq.SetupExtensions" Version="7.0.0" />
<PackageReference Include="Lombiq.Tests.UI.AppExtensions" Version="12.0.0" />
<PackageReference Include="Lombiq.Tests.UI.Shortcuts" Version="12.0.0" />
<PackageReference Include="Lombiq.Tests.UI.AppExtensions" Version="12.0.1-alpha.1.osoe-815" />
<PackageReference Include="Lombiq.Tests.UI.Shortcuts" Version="12.0.1-alpha.1.osoe-815" />
<PackageReference Include="Lombiq.UIKit" Version="9.0.0" />
<PackageReference Include="Lombiq.VueJs" Version="8.0.0" />
<PackageReference Include="Lombiq.VueJs.Samples" Version="8.0.0" />
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="12.0.0" />
<PackageReference Include="Lombiq.HelpfulLibraries" Version="12.0.1-alpha.0.osoe-815" />
<PackageReference Include="OrchardCore.Module.Targets" Version="2.1.0" />
<PackageReference Include="OrchardCore.ContentManagement" Version="2.1.0" />
<PackageReference Include="OrchardCore.ContentTypes.Abstractions" Version="2.1.0" />
Expand Down

This file was deleted.

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

<ItemGroup>
<PackageReference Include="Lombiq.HelpfulLibraries.OrchardCore" Version="12.0.0" />
<PackageReference Include="Lombiq.HelpfulLibraries.OrchardCore" Version="12.0.1-alpha.0.osoe-815" />
<PackageReference Include="Lombiq.HelpfulExtensions" Version="10.0.0" />
<PackageReference Include="Lombiq.BaseTheme.Tests.UI" Version="9.0.0" />
<PackageReference Include="Lombiq.ChartJs.Tests.UI" Version="9.0.0" />
Expand All @@ -30,19 +30,19 @@
<PackageReference Include="Lombiq.Hosting.BuildVersionDisplay.Tests.UI" Version="7.0.0" />
<PackageReference Include="Lombiq.Hosting.MediaTheme.Bridge.Tests.UI" Version="8.0.0" />
<PackageReference Include="Lombiq.Hosting.MediaTheme.Tests.UI" Version="8.0.0" />
<PackageReference Include="Lombiq.Hosting.Tenants.EnvironmentRobots.Tests.UI" Version="9.0.0" />
<PackageReference Include="Lombiq.Hosting.Tenants.FeaturesGuard.Tests.UI" Version="9.0.0" />
<PackageReference Include="Lombiq.Hosting.Tenants.IdleTenantManagement.Tests.UI" Version="9.0.0" />
<PackageReference Include="Lombiq.Hosting.Tenants.MediaStorageManagement.Tests.UI" Version="9.0.0" />
<PackageReference Include="Lombiq.Hosting.Tenants.EmailQuotaManagement.Tests.UI" Version="9.0.0" />
<PackageReference Include="Lombiq.Hosting.Tenants.Maintenance.Tests.UI" Version="9.0.0" />
<PackageReference Include="Lombiq.Hosting.Tenants.Management.Tests.UI" Version="9.0.0" />
<PackageReference Include="Lombiq.Hosting.Tenants.EnvironmentRobots.Tests.UI" Version="9.0.1-alpha.1.osoe-815" />
<PackageReference Include="Lombiq.Hosting.Tenants.FeaturesGuard.Tests.UI" Version="9.0.1-alpha.1.osoe-815" />
<PackageReference Include="Lombiq.Hosting.Tenants.IdleTenantManagement.Tests.UI" Version="9.0.1-alpha.1.osoe-815" />
<PackageReference Include="Lombiq.Hosting.Tenants.MediaStorageManagement.Tests.UI" Version="9.0.1-alpha.1.osoe-815" />
<PackageReference Include="Lombiq.Hosting.Tenants.EmailQuotaManagement.Tests.UI" Version="9.0.1-alpha.1.osoe-815" />
<PackageReference Include="Lombiq.Hosting.Tenants.Maintenance.Tests.UI" Version="9.0.1-alpha.1.osoe-815" />
<PackageReference Include="Lombiq.Hosting.Tenants.Management.Tests.UI" Version="9.0.1-alpha.1.osoe-815" />
<PackageReference Include="Lombiq.JsonEditor.Tests.UI" Version="9.0.0" />
<PackageReference Include="Lombiq.LoginAsAnybody.Tests.UI" Version="5.0.0" />
<PackageReference Include="Lombiq.OrchardCoreApiClient.Tests.UI" Version="7.0.0" />
<PackageReference Include="Lombiq.Privacy.Tests.UI" Version="10.0.0" />
<PackageReference Include="Lombiq.HelpfulExtensions.Tests.UI" Version="10.0.0" />
<PackageReference Include="Lombiq.Tests.UI" Version="12.0.0" />
<PackageReference Include="Lombiq.Tests.UI" Version="12.0.1-alpha.1.osoe-815" />
<PackageReference Include="Lombiq.VueJs.Tests.UI" Version="8.0.0" />
<PackageReference Include="Lombiq.Walkthroughs.Tests.UI" Version="3.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,5 @@ public Task SwitchingUserShouldWorkCorrectly() =>

[Fact]
public Task PermissionCheckShouldWorkCorrectly() =>
ExecuteTestAfterSetupAsync(
context => context.PermissionCheckShouldWorkCorrectlyAsync(),
changeConfiguration: Configurations.IgnoreUnauthorizedBrowserLogEntries);
ExecuteTestAfterSetupAsync(context => context.PermissionCheckShouldWorkCorrectlyAsync());
}
15 changes: 11 additions & 4 deletions NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/UITestBase.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
using Lombiq.OSOCE.NuGet.Tests.UI.Helpers;
using Lombiq.Tests.UI;
using Lombiq.Tests.UI.Extensions;
using Lombiq.Tests.UI.Services;
using Shouldly;
using System;
using System.Linq;
using System.Threading.Tasks;
using Xunit.Abstractions;

Expand Down Expand Up @@ -34,10 +37,14 @@ protected override Task ExecuteTestAsync(
configuration.AssertAppLogsAsync =
OrchardCoreUITestExecutorConfiguration.AssertAppLogsCanContainCacheFolderErrorsAsync;

// These two can be removed once https://github.com/OrchardCMS/OrchardCore/issues/15222 is done.
configuration.AssertBrowserLog = AssertHtmlAndBrowserErrorsHelper.AssertNoNativeButtonUsageInBrowserLog;
configuration.HtmlValidationConfiguration.AssertHtmlValidationResultAsync =
AssertHtmlAndBrowserErrorsHelper.AssertNoNativeButtonUsageInHtmlValidation;
// This can be removed once https://github.com/OrchardCMS/OrchardCore/issues/15222 is done.
configuration.HtmlValidationConfiguration.AssertHtmlValidationResultAsync = async errors =>
{
var errorResult = (await errors.GetErrorsAsync())
.Where(error => !error.ContainsOrdinalIgnoreCase("Prefer to use the native <button> element"));

errorResult.ShouldBeEmpty();
};

if (changeConfigurationAsync != null) await changeConfigurationAsync(configuration);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Lombiq.HelpfulLibraries" Version="12.0.0" />
<PackageReference Include="Lombiq.HelpfulLibraries" Version="12.0.1-alpha.0.osoe-815" />
<PackageReference Include="Lombiq.Tests" Version="4.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.0">
Expand Down
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ When adding a new extension, or significant new features to existing extensions,
- If you introduce .NET breaking changes, the Validate NuGet Publish workflow will fail due to [baseline package validation](https://learn.microsoft.com/en-us/dotnet/fundamentals/apicompat/package-validation/baseline-version-validator). Preferably, adjust the change to not be breaking if possible; if it has to be a breaking change, then you’ll need to create a _CompatibilitySuppressions.xml_ file to mark it as deliberate, what you can do with the following command:

```powershell
dotnet pack /p:EnablePackageValidation=true /p:PackageValidationBaselineVersion=<current version, like 1.2.3> /p:Version=<the next patch version> /p:NuGetBuild=true /p:GenerateCompatibilitySuppressionFile=true
dotnet pack /p:EnablePackageValidation=true /p:PackageValidationBaselineVersion=<current version, like 1.2.3> /p:Version=<the next patch version, like 1.2.4> /p:NuGetBuild=true /p:GenerateCompatibilitySuppressionFile=true
```

### Dependencies between Lombiq projects
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,5 @@ public Task SwitchingUserShouldWorkCorrectly() =>
[Fact]
public Task PermissionCheckShouldWorkCorrectly() =>
ExecuteTestAfterSetupAsync(
context => context.PermissionCheckShouldWorkCorrectlyAsync(),
changeConfiguration: Configurations.IgnoreUnauthorizedBrowserLogEntries);
context => context.PermissionCheckShouldWorkCorrectlyAsync());
}
16 changes: 5 additions & 11 deletions test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorVueTests.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
using Atata.HtmlValidation;
using Lombiq.Tests.UI.Extensions;
using Lombiq.Tests.UI.Services;
using Lombiq.VueJs.Samples.Controllers;
using Lombiq.VueJs.Tests.UI.Extensions;
using Shouldly;
using System;
using System.Linq;
using System.Threading.Tasks;
using Xunit;
Expand Down Expand Up @@ -46,15 +44,11 @@ public Task QrCardScanShouldReportNotFoundAsync() =>
{
configuration.BrowserConfiguration.ConfigureFakeVideoSourceForNegativeTest();
configuration.HtmlValidationConfiguration.AssertHtmlValidationResultAsync = AssertHtmValidationResultAsync;
configuration.AssertBrowserLog = logEntries =>
OrchardCoreUITestExecutorConfiguration.AssertBrowserLogIsEmpty(
logEntries.Where(logEntry =>
// The fetch call reports an error to the browser console if the
// QrCardController.GetBusinessCard() action results in NotFound.
!(
logEntry.Message.ContainsOrdinalIgnoreCase(nameof(QrCardController.GetBusinessCard))
&& logEntry.Message.ContainsOrdinalIgnoreCase(
"Failed to load resource: the server responded with a status of 404"))));

// The fetch call reports an error to the browser console if the QrCardController.GetBusinessCard()
// action results in NotFound.
configuration.ResponseLogFilter = e =>
e.IsNonSuccessResponseAndNotExpectedNotFoundResponse(nameof(QrCardController.GetBusinessCard));
});

private static Task AssertHtmValidationResultAsync(HtmlValidationResult validationResult)
Expand Down
Loading