Skip to content

Commit

Permalink
Merge pull request #633 from Lombiq/issue/OSOE-727
Browse files Browse the repository at this point in the history
OSOE-727: SignInDirectly randomly fails with 404 in Lombiq.UITestingToolbox
  • Loading branch information
Piedone authored Dec 5, 2023
2 parents 11390a5 + e97db82 commit bcf02fc
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Lombiq.Hosting.Tenants.Maintenance.Tests.UI.Extensions;
using Lombiq.OSOCE.NuGet.Tests.UI.Helpers;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
Expand All @@ -12,9 +13,18 @@ public BehaviorMaintenanceTests(ITestOutputHelper testOutputHelper)
{
}

// 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() =>
ExecuteTestAfterSetupAsync(
ExecuteTestAsync(
context => context.ChangeUserSensitiveContentMaintenanceExecutionAsync(),
async context =>
{
var homepageUri = await SetupHelpers.RunSetupAsync(context);
return homepageUri;
},
configuration => configuration.ChangeUserSensitiveContentMaintenanceConfiguration());
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Lombiq.Hosting.Tenants.Maintenance.Tests.UI.Extensions;
using Lombiq.Tests.UI.Samples.Helpers;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
Expand All @@ -24,9 +25,18 @@ public Task AddSiteOwnerPermissionToRoleMaintenanceTaskShouldBeExecutedSuccessfu
context => context.TestSiteOwnerPermissionToRoleMaintenanceExecutionAsync(),
configuration => configuration.SetAddSiteOwnerPermissionToRoleMaintenanceConfiguration());

// 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() =>
ExecuteTestAfterSetupAsync(
ExecuteTestAsync(
context => context.ChangeUserSensitiveContentMaintenanceExecutionAsync(),
async context =>
{
var homepageUri = await SetupHelpers.RunSetupAsync(context);
return homepageUri;
},
configuration => configuration.ChangeUserSensitiveContentMaintenanceConfiguration());
}

0 comments on commit bcf02fc

Please sign in to comment.