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 9 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,7 @@
using Lombiq.Hosting.Tenants.Maintenance.Tests.UI.Extensions;
using Lombiq.Tests.UI.Extensions;
using Lombiq.Tests.UI.Pages;
using OpenQA.Selenium;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
Expand All @@ -12,9 +15,27 @@ public BehaviorMaintenanceTests(ITestOutputHelper testOutputHelper)
{
}

// This test employs ExecuteTestAsync with a distinct setup delegate instead of ExecuteTestAfterSetupAsync.
// This choice is prompted by the modifications it applies to the appsettings.json file, occasionally leading
// to failures in subsequent tests within the NuGet solution in the CI environment
[Fact]
public Task ChangeUserSensitiveContentMaintenanceTaskShouldBeExecutedSuccessfully() =>
ExecuteTestAfterSetupAsync(
ExecuteTestAsync(
Piedone marked this conversation as resolved.
Show resolved Hide resolved
context => context.ChangeUserSensitiveContentMaintenanceExecutionAsync(),
async context =>
{
var homepageUri = await context.GoToSetupPageAndSetupOrchardCoreAsync(
new OrchardCoreSetupParameters(context)
{
SiteName = "Lombiq's OSOCE - UI Testing",
RecipeId = "Lombiq.OSOCE.NuGet.Tests",
TablePrefix = "OSOCE",
SiteTimeZoneValue = "Europe/Budapest",
});

context.Exists(By.Id("navbar"));

return homepageUri;
Piedone marked this conversation as resolved.
Show resolved Hide resolved
},
configuration => configuration.ChangeUserSensitiveContentMaintenanceConfiguration());
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
using Lombiq.Hosting.Tenants.Maintenance.Tests.UI.Extensions;
using Lombiq.Tests.UI.Extensions;
using Lombiq.Tests.UI.Pages;
using OpenQA.Selenium;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
Expand All @@ -24,9 +27,27 @@ public Task AddSiteOwnerPermissionToRoleMaintenanceTaskShouldBeExecutedSuccessfu
context => context.TestSiteOwnerPermissionToRoleMaintenanceExecutionAsync(),
configuration => configuration.SetAddSiteOwnerPermissionToRoleMaintenanceConfiguration());

// This test employs ExecuteTestAsync with a distinct setup delegate instead of ExecuteTestAfterSetupAsync.
// This choice is prompted by the modifications it applies to the appsettings.json file, occasionally leading
// to failures in subsequent tests within the NuGet solution in the CI environment
Psichorex marked this conversation as resolved.
Show resolved Hide resolved
[Fact]
public Task ChangeUserSensitiveContentMaintenanceTaskShouldBeExecutedSuccessfully() =>
ExecuteTestAfterSetupAsync(
ExecuteTestAsync(
context => context.ChangeUserSensitiveContentMaintenanceExecutionAsync(),
async context =>
{
var homepageUri = await context.GoToSetupPageAndSetupOrchardCoreAsync(
new OrchardCoreSetupParameters(context)
{
SiteName = "Lombiq's OSOCE - UI Testing",
RecipeId = "Lombiq.OSOCE.Tests",
TablePrefix = "OSOCE",
SiteTimeZoneValue = "Europe/Budapest",
});

context.Exists(By.Id("navbar"));

return homepageUri;
Piedone marked this conversation as resolved.
Show resolved Hide resolved
},
configuration => configuration.ChangeUserSensitiveContentMaintenanceConfiguration());
}