Skip to content

Commit

Permalink
Separate shortcut method is used instead of a default value to avoid …
Browse files Browse the repository at this point in the history
…error CP0002.
  • Loading branch information
sarahelsaig committed May 21, 2024
1 parent 01087d0 commit 1fc941d
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,22 @@ namespace Lombiq.Hosting.MediaTheme.Tests.UI.Extensions;

public static class TestCaseUITestContextExtensions
{
public static async Task TestMediaThemeDeployedBehaviorAsync(this UITestContext context, string tenantPrefix = null)
// Separate shortcut method is used instead of a default value to avoid error CP0002.
public static Task TestMediaThemeDeployedBehaviorAsync(this UITestContext context) =>
context.TestMediaThemeDeployedBehaviorAsync(tenantPrefix: null);

public static async Task TestMediaThemeDeployedBehaviorAsync(this UITestContext context, string tenantPrefix)
{
await context.ExecuteMediaThemeSampleRecipeDirectlyAsync();
await context.GoToMediaThemeTestContentPageAsync();
AssertElements(context, "v", tenantPrefix);
}

public static async Task TestMediaThemeLocalBehaviorAsync(this UITestContext context, string tenantPrefix = null)
// Separate shortcut method is used instead of a default value to avoid error CP0002.
public static Task TestMediaThemeLocalBehaviorAsync(this UITestContext context) =>
context.TestMediaThemeLocalBehaviorAsync(tenantPrefix: null);

public static async Task TestMediaThemeLocalBehaviorAsync(this UITestContext context, string tenantPrefix)
{
await context.SetThemeDirectlyAsync("Lombiq.Hosting.MediaTheme.Tests.Theme");
await context.GoToHomePageAsync(onlyIfNotAlreadyThere: false);
Expand Down

0 comments on commit 1fc941d

Please sign in to comment.