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

OFFI-78: Support different base path for OC app #386

Merged
merged 13 commits into from
Jul 17, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public static Task TestMediaOperationsAsync(this UITestContext context) =>
context.Exists(By.XPath($"//span[contains(text(), '{imageName}')]"));

await context
.Get(By.CssSelector($"a[href=\"/media/{imageName}\"]").OfAnyVisibility())
sarahelsaig marked this conversation as resolved.
Show resolved Hide resolved
.Get(By.CssSelector($"a[href=\"{context.UrlPrefix}/media/{imageName}\"]").OfAnyVisibility())
sarahelsaig marked this conversation as resolved.
Show resolved Hide resolved
.ClickReliablyAsync(context);
// Closing the newly opened tab with the image, so the browser doesn't continue to switch the UI back
// and forth.
Expand All @@ -56,7 +56,7 @@ await context
.ClickReliablyAsync(context);

await context
.Get(By.CssSelector($"a[href=\"/media/{documentName}\"]"))
.Get(By.CssSelector($"a[href=\"{context.UrlPrefix}/media/{documentName}\"]"))
sarahelsaig marked this conversation as resolved.
Show resolved Hide resolved
.ClickReliablyAsync(context);
context.SwitchToLastWindow();
context.Driver.Close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,11 @@ internal async Task ApplyToPlanAsync(YamlDocument yamlDocument, UITestContext co
// pollPostData: ""
}

yamlDocument.AddExcludePathsRegex([.. _excludedUrlRegexPatterns]);
// We can do this or use collection expression which results S3878: Remove this array creation and simply pass
// the elements.
#pragma warning disable IDE0305 // IDE0305: Collection initialization can be simplified
yamlDocument.AddExcludePathsRegex(_excludedUrlRegexPatterns.ToArray());
#pragma warning restore IDE0305
if (AdminIsExcluded) yamlDocument.AddExcludePathsRegex($".*{context.AdminUrlPrefix}.*");

if (UnusedDatabaseTechnologiesAreExcluded)
Expand Down