Skip to content

Commit

Permalink
Merge pull request #384 from Lombiq/issue/ADHOC-463
Browse files Browse the repository at this point in the history
ADHOC-463: Optimizing basic Media operations testing
  • Loading branch information
BenedekFarkas authored Jul 11, 2024
2 parents 3662e45 + 258adec commit 3c3f2e7
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ public static Task TestMediaOperationsAsync(this UITestContext context) =>
await context
.Get(By.CssSelector($"a[href=\"/media/{imageName}\"]").OfAnyVisibility())
.ClickReliablyAsync(context);
// Closing the newly opened tab with the image, so the browser doesn't continue to switch the UI back
// and forth.
context.SwitchToLastWindow();
context.Driver.Close();
context.SwitchToFirstWindow();
context.WaitForPageLoad();
Expand All @@ -54,6 +58,8 @@ await context
await context
.Get(By.CssSelector($"a[href=\"/media/{documentName}\"]"))
.ClickReliablyAsync(context);
context.SwitchToLastWindow();
context.Driver.Close();
context.SwitchToFirstWindow();
context.WaitForPageLoad();
Expand Down

0 comments on commit 3c3f2e7

Please sign in to comment.