Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
267a61d
Update OC versions to preview.
sarahelsaig Jan 7, 2026
0dd5a5a
Remove old compatibility suppressions files.
sarahelsaig Jan 8, 2026
0c518cb
Remove OrchardCore.Tenants from the recipes.
sarahelsaig Jan 11, 2026
233d548
Upgrade OC preview.
sarahelsaig Jan 14, 2026
cd2a975
Merge remote-tracking branch 'origin/dev' into issue/OSOE-925
sarahelsaig Jan 16, 2026
f5fb722
Update branch selector.
sarahelsaig Jan 19, 2026
3a5a53d
Update branch selectors.
sarahelsaig Jan 19, 2026
fccb5d5
CompatibilitySuppressions.xml
sarahelsaig Jan 20, 2026
a280886
Nuget.
sarahelsaig Jan 20, 2026
b67dce4
Delete all CompatibilitySuppressions so we may start from scratch.
sarahelsaig Jan 20, 2026
5147e8e
CompatibilitySuppressions.xml
sarahelsaig Jan 20, 2026
ecb9736
Merge remote-tracking branch 'origin/dev' into issue/OSOE-925
sarahelsaig Jan 20, 2026
1b723c7
Typo
Piedone Jan 21, 2026
bb0304c
Merge remote-tracking branch 'origin/dev' into issue/OSOE-925
sarahelsaig Jan 22, 2026
5e9c904
Upgrade OC preview.
sarahelsaig Jan 22, 2026
941afe7
HL nuget
sarahelsaig Jan 22, 2026
c2f1e98
Renames and minor fixes.
sarahelsaig Jan 22, 2026
d857b4a
Update UITT NuGet.
sarahelsaig Jan 22, 2026
1e266dc
UC preview update.
sarahelsaig Jan 23, 2026
de7397a
Update HL nuget.
sarahelsaig Jan 23, 2026
bd51bd5
Better error checking.
sarahelsaig Jan 26, 2026
58ff684
Fix formatting
sarahelsaig Jan 26, 2026
227e2d2
Serialize
sarahelsaig Jan 26, 2026
da3f9ee
Fill out DatabaseProvider in the setupApiModel as well.
sarahelsaig Jan 26, 2026
e196fd8
Add retries to TestTenantSetupAsync.
sarahelsaig Jan 27, 2026
332068f
Add delay.
sarahelsaig Jan 27, 2026
a08d16e
Revert "Add delay."
sarahelsaig Jan 27, 2026
d571023
Revert "Add retries to TestTenantSetupAsync."
sarahelsaig Jan 27, 2026
bb97be5
Update OC preview.
sarahelsaig Jan 27, 2026
ac9136e
Update HL NuGet.
sarahelsaig Jan 28, 2026
6c85bf4
Update OC preview.
sarahelsaig Feb 4, 2026
dee0c30
Update OC preview.
sarahelsaig Feb 5, 2026
25ca53a
Merge remote-tracking branch 'origin/dev' into issue/OSOE-925
sarahelsaig Feb 5, 2026
dd8d97d
Update HL Nuget.
sarahelsaig Feb 5, 2026
aaa7c8e
Update UITT nuget.
sarahelsaig Feb 5, 2026
a88be14
Upda
sarahelsaig Feb 6, 2026
4f4423f
Update OC to avoid missing method exceptions.
sarahelsaig Feb 12, 2026
204f1e7
Update OC preview.
sarahelsaig Feb 16, 2026
7b21ba2
Merge remote-tracking branch 'origin/issue/OSOE-925' into issue/OSOE-925
sarahelsaig Feb 16, 2026
8fddcc9
Update OC preview and fix build errors.
sarahelsaig Feb 21, 2026
0b34932
Update OC preview.
sarahelsaig Feb 22, 2026
b72c667
Update HL nuget.
sarahelsaig Feb 22, 2026
9ffe0b2
UITT nuget
sarahelsaig Feb 22, 2026
ed5a2bb
Update HL nuget correctly.
sarahelsaig Feb 22, 2026
01d8cd5
Update UITT nuget correctly.
sarahelsaig Feb 22, 2026
6cabac9
Add diagnostics on invalid URL.
sarahelsaig Feb 27, 2026
66bb483
Update OC preview.
sarahelsaig Mar 7, 2026
4a7f37e
Update nugets.
sarahelsaig Mar 7, 2026
0a383de
Merge remote-tracking branch 'origin/dev' into issue/OSOE-925
sarahelsaig Mar 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/publish-nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ on:
jobs:
publish-nuget:
name: Publish to NuGet
uses: Lombiq/GitHub-Actions/.github/workflows/publish-nuget.yml@dev
uses: Lombiq/GitHub-Actions/.github/workflows/publish-nuget.yml@issue/OSOE-925
secrets:
API_KEY: ${{ secrets.DEFAULT_NUGET_PUBLISH_API_KEY }}
2 changes: 1 addition & 1 deletion .github/workflows/validate-nuget-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ on:
jobs:
validate-nuget-publish:
name: Validate NuGet Publish
uses: Lombiq/GitHub-Actions/.github/workflows/validate-nuget-publish.yml@dev
uses: Lombiq/GitHub-Actions/.github/workflows/validate-nuget-publish.yml@issue/OSOE-925
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
"OrchardCore.OpenId.Management",
"OrchardCore.OpenId.Server",
"OrchardCore.OpenId.Validation",
"OrchardCore.Taxonomies",
"OrchardCore.Tenants"
"OrchardCore.Taxonomies"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
<!-- https://learn.microsoft.com/dotnet/fundamentals/package-validation/diagnostic-ids -->
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:Lombiq.OrchardCoreApiClient.Tests.UI.Extensions.TestCaseUITestContextExtensions.TestTenantsOrchardCoreApiClientBehaviorAsync(Lombiq.Tests.UI.Services.UITestContext,System.String,System.String,System.String)</Target>
<Left>lib/net8.0/Lombiq.OrchardCoreApiClient.Tests.UI.dll</Left>
<Right>lib/net8.0/Lombiq.OrchardCoreApiClient.Tests.UI.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
<DiagnosticId>PKV006</DiagnosticId>
<Target>net8.0</Target>
</Suppression>
</Suppressions>
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@
using OpenQA.Selenium;
using OrchardCore.Autoroute.Models;
using OrchardCore.ContentManagement;
using OrchardCore.Data;
using OrchardCore.Taxonomies.Models;
using Refit;
using Shouldly;
using System;
using System.Linq;
using System.Net;
using System.Net.Http.Json;
using System.Text.Json;
using System.Threading.Tasks;
using Xunit;
Expand All @@ -29,6 +33,7 @@ public static async Task TestOrchardCoreApiClientBehaviorAsync(
string clientSecret = null,
string featureProfile = null)
{
await context.EnableTenantsFeatureDirectlyAsync();
await context.TestTenantsOrchardCoreApiClientBehaviorAsync(
new ApiClientBehaviorTestModel
{
Expand Down Expand Up @@ -103,10 +108,12 @@ public static async Task TestTenantsOrchardCoreApiClientBehaviorAsync(
{
context.Configuration.TestOutputHelper.WriteLineTimestampedAndDebug("Using local test settings for creating tenant.");
var databaseProvider = context.Configuration.UseSqlServer
? "SqlConnection"
: "Sqlite";
? DatabaseProviderValue.SqlConnection
: DatabaseProviderValue.Sqlite;
createApiModel.DatabaseProvider = databaseProvider;
createApiModel.ConnectionString = context.SqlServerRunningContext?.ConnectionString;
setupApiModel.DatabaseProvider = databaseProvider;
setupApiModel.ConnectionString = context.SqlServerRunningContext?.ConnectionString;
createApiModel.RequestUrlHost = string.Empty;
editModel.RequestUrlHost = string.Empty;
}
Expand Down Expand Up @@ -230,14 +237,37 @@ private static async Task TestTenantCreateAsync(
using (var response = await apiClient.OrchardCoreApi.CreateAsync(createApiModel))
{
await context.AssertLogsAsync();
response.Error.ShouldBeNull(
$"Tenant creation failed with status code {response.StatusCode}. Content: {response.Error?.Content}\n" +
$"Request: {response.RequestMessage}\nDriver URL: {context.Driver.Url}");
CheckResponse(response, "creation", context);

context.Configuration.TestOutputHelper.WriteLineTimestampedAndDebug("Tenant creation response had no errors.");

// Check if response URL is valid, and visit it (should be the tenant setup page and not 404 error).
var responseUrl = new Uri(response.Content);
if (!Uri.TryCreate(response.Content, UriKind.Absolute, out var responseUrl))
{
context.Configuration.TestOutputHelper.WriteLineTimestampedAndDebug(
$"Couldn't parse response URL ({response.Content}).\n" + JsonSerializer.Serialize(new
{
response.Content,
response.ContentHeaders,
response.Error,
response.Headers,
response.IsSuccessful,
response.IsSuccessStatusCode,
response.ReasonPhrase,
response.StatusCode,
response.Version,
RequestMessage = new
{
response.RequestMessage?.Content,
response.RequestMessage?.Headers,
response.RequestMessage?.Version,
response.RequestMessage?.Method,
response.RequestMessage?.RequestUri,
response.RequestMessage?.VersionPolicy,
},
}));
}

context.Configuration.TestOutputHelper.WriteLineTimestampedAndDebug("Trying to go to the tenant setup page: " + responseUrl);
await context.GoToAbsoluteUrlAsync(responseUrl);
}
Expand Down Expand Up @@ -275,9 +305,7 @@ private static async Task TestTenantSetupAsync(
context.Configuration.TestOutputHelper.WriteLineTimestampedAndDebug("Initiating tenant setup...");
using (var response = await apiClient.OrchardCoreApi.SetupAsync(setupApiModel))
{
response.Error.ShouldBeNull(
$"Tenant setup failed with status code {response.StatusCode}. Content: {response.Error?.Content}\n" +
$"Request: {response.RequestMessage}\nDriver URL: {context.Driver.Url}");
CheckResponse(response, "setup", context);
}

context.Configuration.TestOutputHelper.WriteLineTimestampedAndDebug("Now going to the tenant landing page to assert the setup.");
Expand All @@ -302,9 +330,7 @@ private static async Task TestTenantEditAsync(
context.Configuration.TestOutputHelper.WriteLineTimestampedAndDebug("Editing the tenant...");
using (var response = await apiClient.OrchardCoreApi.EditAsync(editModel))
{
response.Error.ShouldBeNull(
$"Tenant edit failed with status code {response.StatusCode}. Content: {response.Error?.Content}\n" +
$"Request: {response.RequestMessage}\nDriver URL: {context.Driver.Url}");
CheckResponse(response, "edit", context);
}

if (checkOnAdmin)
Expand All @@ -328,9 +354,7 @@ private static async Task TestTenantEditAsync(

using (var response = await apiClient.OrchardCoreApi.EditAsync(editModel))
{
response.Error.ShouldBeNull(
$"Tenant edit (with name change) failed with status code {response.StatusCode}. Content: {response.Error?.Content}\n" +
$"Request: {response.RequestMessage}\nDriver URL: {context.Driver.Url}");
CheckResponse(response, "edit (with name change)", context);
}

if (checkOnAdmin)
Expand Down Expand Up @@ -365,9 +389,7 @@ private static async Task TestTenantDisableAsync(

using (var response = await apiClient.OrchardCoreApi.DisableAsync(editModel.Name))
{
response.Error.ShouldBeNull(
$"Tenant disable failed with status code {response.StatusCode}. Content: {response.Error?.Content}\n" +
$"Request: {response.RequestMessage}\nDriver URL: {context.Driver.Url}");
CheckResponse(response, "disable", context);
}

if (checkOnAdmin)
Expand Down Expand Up @@ -395,7 +417,7 @@ await ReliabilityHelper.DoWithRetriesOrFailAsync(

// The tenant can remain running for a while even after having been disabled. Waiting a bit here to see
// if it gets unstuck.
if (response.StatusCode == System.Net.HttpStatusCode.BadRequest &&
if (response.StatusCode == HttpStatusCode.BadRequest &&
response.Error?.Content?.Contains($"The tenant '{editModel.Name}' should be 'Disabled' or 'Uninitialized'.") == true)
{
context.Configuration.TestOutputHelper.WriteLineTimestampedAndDebug(
Expand All @@ -404,9 +426,7 @@ await ReliabilityHelper.DoWithRetriesOrFailAsync(
return false;
}

response.Error.ShouldBeNull(
$"Tenant remove failed with status code {response.StatusCode}. Content: {response.Error?.Content}\n" +
$"Request: {response.RequestMessage}\nDriver URL: {context.Driver.Url}");
CheckResponse(response, "remove", context);

return true;
},
Expand Down Expand Up @@ -530,4 +550,17 @@ private static ApiClientSettings CreateApiClientSettings(UITestContext context,
DisableCertificateValidation = true,
};
}

private static void CheckResponse(ApiResponse<string> response, string taskName, UITestContext context)
{
var request = response.RequestMessage?.ToString() ?? "<Empty Request>";
if (response.RequestMessage?.Content is JsonContent jsonContent)
{
request += "\nJSON Content: " + JsonSerializer.Serialize(jsonContent.Value);
}

response.Error.ShouldBeNull(
$"Tenant {taskName} failed with status code {response.StatusCode}. Content: {response.Error?.Content}\n" +
$"Request: {request}\nDriver URL: {context.Driver.Url}");
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
</PropertyGroup>

<PropertyGroup>
Expand All @@ -21,7 +21,7 @@
</ItemGroup>

<ItemGroup Condition="'$(NuGetBuild)' == 'true'">
<PackageReference Include="Lombiq.Tests.UI" Version="14.2.0" />
<PackageReference Include="Lombiq.Tests.UI" Version="14.2.2-alpha.7.osoe-925" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
"OrchardCore.OpenId",
"OrchardCore.OpenId.Management",
"OrchardCore.OpenId.Server",
"OrchardCore.OpenId.Validation",
"OrchardCore.Tenants"
"OrchardCore.OpenId.Validation"
]
},
// In this sample we must use "ASP.NET Core Data Protection" access token format (which doesn't use encryption),
Expand Down
8 changes: 8 additions & 0 deletions Lombiq.OrchardCoreApiClient/CompatibilitySuppressions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- https://learn.microsoft.com/dotnet/fundamentals/package-validation/diagnostic-ids -->
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Suppression>
<DiagnosticId>PKV006</DiagnosticId>
<Target>net8.0</Target>
</Suppression>
</Suppressions>
2 changes: 1 addition & 1 deletion Lombiq.OrchardCoreApiClient/Interfaces/IOrchardCoreApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Lombiq.OrchardCoreApiClient.Interfaces;
[SuppressMessage(
"Design",
"CA1040:Avoid empty interfaces",
Justification = "This is a base interface used to identify all Orchard Core API interfaces May be extended in the future.")]
Justification = "This is a base interface used to identify all Orchard Core API interfaces. May be extended in the future.")]
public interface IOrchardCoreApi
{
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<DefaultItemExcludes>$(DefaultItemExcludes);.git*</DefaultItemExcludes>
</PropertyGroup>

Expand All @@ -25,7 +25,7 @@
<ItemGroup>
<PackageReference Include="NodaTime" Version="3.3.1" />
<PackageReference Include="Polly" Version="8.6.6" />
<PackageReference Include="OrchardCore.ContentManagement.Abstractions" Version="2.1.0" />
<PackageReference Include="OrchardCore.ContentManagement.Abstractions" Version="3.0.0-preview-18937" />
</ItemGroup>

<ItemGroup Condition="'$(NuGetBuild)' != 'true' and Exists($(LombiqHelpfulLibrariesPath))">
Expand All @@ -37,7 +37,7 @@
</ItemGroup>

<ItemGroup Condition="'$(NuGetBuild)' == 'true'">
<PackageReference Include="Lombiq.HelpfulLibraries.Refit" Version="12.5.0" />
<PackageReference Include="Lombiq.HelpfulLibraries.Refit" Version="12.6.1-alpha.5.osoe-925" />
</ItemGroup>

</Project>
Loading