diff --git a/Lombiq.Tests.UI/Extensions/BasicOrchardFeaturesTestingUITestContextExtensions.cs b/Lombiq.Tests.UI/Extensions/BasicOrchardFeaturesTestingUITestContextExtensions.cs index 9774a41a1..1ac95a9f7 100644 --- a/Lombiq.Tests.UI/Extensions/BasicOrchardFeaturesTestingUITestContextExtensions.cs +++ b/Lombiq.Tests.UI/Extensions/BasicOrchardFeaturesTestingUITestContextExtensions.cs @@ -564,10 +564,11 @@ public static Task TestMediaOperationsAsync(this UITestContext context) => "Test media operations", async () => { + const string mediaPath = "/Media"; var imageName = FileUploadHelper.SamplePngFileName; var documentName = FileUploadHelper.SamplePdfFileName; - await context.GoToAdminRelativeUrlAsync("/Media"); + await context.GoToAdminRelativeUrlAsync(mediaPath); context.UploadSamplePngByIdOfAnyVisibility("fileupload"); // #spell-check-ignore-line @@ -583,7 +584,7 @@ await context context.SwitchToFirstWindow(); context.WaitForPageLoad(); - await context.GoToAdminRelativeUrlAsync("/Media"); + await context.GoToAdminRelativeUrlAsync(mediaPath); context.UploadSamplePdfByIdOfAnyVisibility("fileupload"); // #spell-check-ignore-line @@ -603,7 +604,7 @@ await context context.SwitchToFirstWindow(); context.WaitForPageLoad(); - await context.GoToAdminRelativeUrlAsync("/Media"); + await context.GoToAdminRelativeUrlAsync(mediaPath); await context .Get(By.CssSelector("#folder-tree .treeroot .folder-actions")) // #spell-check-ignore-line @@ -629,13 +630,18 @@ await context .ClickReliablyAsync(context); await context.ClickModalOkAsync(); + context.WaitForPageLoad(); + await context.GoToAdminRelativeUrlAsync(mediaPath); context.Missing(By.XPath("//span[text()=' Image.png ' and @class='break-word']")); var deleteFolderButton = context.Get(By.CssSelector("#folder-tree li.selected div.btn-group.folder-actions .svg-inline--fa.fa-trash")); await deleteFolderButton.ClickReliablyAsync(context); + await context.ClickModalOkAsync(); + context.WaitForPageLoad(); + await context.GoToAdminRelativeUrlAsync(mediaPath); context.Missing(By.XPath("//div[text()='Example Folder' and @class='folder-name ms-2']")); });