From ef00fd0da848a1cb621a8723f9751260febcb599 Mon Sep 17 00:00:00 2001 From: ChrisJoosse Date: Thu, 2 Oct 2025 12:27:47 -0700 Subject: [PATCH 1/2] increment number to account for attachment as well as wiki --- src/org/labkey/test/tests/wiki/WikiTest.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/org/labkey/test/tests/wiki/WikiTest.java b/src/org/labkey/test/tests/wiki/WikiTest.java index 25f63450bc..c13623f831 100644 --- a/src/org/labkey/test/tests/wiki/WikiTest.java +++ b/src/org/labkey/test/tests/wiki/WikiTest.java @@ -312,6 +312,8 @@ public void testDeleteUndeleteAttachment() throws IOException .as("expect strikethrough style not to be present") .doesNotContain("text-decoration: line-through")); wikiHelper.saveWikiPage(); + // note: attaching the file and leaving it there will create a search result, so increment wikiCreated count here + numberOfWikiCreated++; // verify save after undelete persists the attachment assertElementPresent(Locator.linkWithText(fileName)); From d7fd5c68e5510841efe873f0796284702ec9e37c Mon Sep 17 00:00:00 2001 From: ChrisJoosse Date: Fri, 3 Oct 2025 11:12:32 -0700 Subject: [PATCH 2/2] added synchronization --- src/org/labkey/test/tests/wiki/WikiTest.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/org/labkey/test/tests/wiki/WikiTest.java b/src/org/labkey/test/tests/wiki/WikiTest.java index c13623f831..dea85b5e42 100644 --- a/src/org/labkey/test/tests/wiki/WikiTest.java +++ b/src/org/labkey/test/tests/wiki/WikiTest.java @@ -270,10 +270,10 @@ public void testDeleteUndeleteAttachment() throws IOException wikiHelper.setWikiBody("

" + wikiContent + "

"); wikiHelper.saveWikiPage(); numberOfWikiCreated++; - clickAndWait(wikiPageLinkLoc); + waitAndClickAndWait(wikiPageLinkLoc); log("adding an attachment"); - clickAndWait(editLinkLoc); + waitAndClickAndWait(editLinkLoc); click(filePickerLinkLoc); setFormElement(fileInputLoc, testAttachment); waitForElement(removeLinkLoc); // when just attached, 'remove' will be an option but delete will not be @@ -287,7 +287,7 @@ public void testDeleteUndeleteAttachment() throws IOException clickAndWait(wikiPageLinkLoc); log("Deleting attachment"); - clickAndWait(editLinkLoc); + waitAndClickAndWait(editLinkLoc); click(deleteLinkLoc); waitForElement(attachmentParentLoc.withAttributeContaining("style", "text-decoration: line-through")); wikiHelper.saveWikiPage(); @@ -297,14 +297,14 @@ public void testDeleteUndeleteAttachment() throws IOException log("prepare to delete/undelete attachment"); // re-attach the file and save - clickAndWait(editLinkLoc); + waitAndClickAndWait(editLinkLoc); click(filePickerLinkLoc); setFormElement(fileInputLoc, testAttachment); wikiHelper.saveWikiPage(); clickAndWait(wikiPageLinkLoc); log("Un-Deleting attachment"); - clickAndWait(editLinkLoc); + waitAndClickAndWait(editLinkLoc); click(deleteLinkLoc); // delete waitForElement(attachmentParentLoc.withAttributeContaining("style", "text-decoration: line-through")); waitAndClick(undeleteLinkLoc);