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-727: SignInDirectly randomly fails with 404 in Lombiq.UITestingToolbox #633

Merged
merged 16 commits into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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(
Piedone marked this conversation as resolved.
Show resolved Hide resolved
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());
}