From 16912e4712f00973103dbd9ea78a0a8fa31d8990 Mon Sep 17 00:00:00 2001 From: labkey-danield Date: Mon, 15 Dec 2025 11:47:40 -0800 Subject: [PATCH 1/3] Remove the code that finds and clicks the row label in CustomizeView.addItem. --- src/org/labkey/test/components/CustomizeView.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/org/labkey/test/components/CustomizeView.java b/src/org/labkey/test/components/CustomizeView.java index ebf27949da..e7d663e431 100644 --- a/src/org/labkey/test/components/CustomizeView.java +++ b/src/org/labkey/test/components/CustomizeView.java @@ -391,8 +391,6 @@ private void addItem(CharSequence fieldKey, ViewItemType type) // Expand all nodes necessary to reveal the desired node. WebElement fieldRow = expandPivots(fieldKey); WebElement checkbox = Locator.css("input[type=button]").findElement(fieldRow); - WebElement rowLabel = Locator.byClass("x4-tree-node-text").findElement(fieldRow); - rowLabel.click(); ScrollUtils.scrollIntoView(checkbox); new Checkbox(checkbox).check(); itemXPath(type, fieldKey).waitForElement(this, 2_000); From c3170dbf5aa983733abfd2fd5039721ca5d3e267 Mon Sep 17 00:00:00 2001 From: labkey-danield Date: Mon, 15 Dec 2025 17:35:08 -0800 Subject: [PATCH 2/3] Adding a comment. --- src/org/labkey/test/components/CustomizeView.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/org/labkey/test/components/CustomizeView.java b/src/org/labkey/test/components/CustomizeView.java index e7d663e431..6aaac8960f 100644 --- a/src/org/labkey/test/components/CustomizeView.java +++ b/src/org/labkey/test/components/CustomizeView.java @@ -390,6 +390,7 @@ private void addItem(CharSequence fieldKey, ViewItemType type) // Expand all nodes necessary to reveal the desired node. WebElement fieldRow = expandPivots(fieldKey); + // Just click the checkbox, don't need to click the row. WebElement checkbox = Locator.css("input[type=button]").findElement(fieldRow); ScrollUtils.scrollIntoView(checkbox); new Checkbox(checkbox).check(); From 3d6abe0e672f61dadd4a59d268e42e7a93139042 Mon Sep 17 00:00:00 2001 From: labkey-danield Date: Tue, 16 Dec 2025 15:18:32 -0800 Subject: [PATCH 3/3] Use refind for some elements. Only use awaiting in SMAsyncImportAndNotificationBaseTest.validateNotificationMessage --- src/org/labkey/test/components/CustomizeView.java | 11 +++++++++-- .../ui/notifications/ServerNotificationMenu.java | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/org/labkey/test/components/CustomizeView.java b/src/org/labkey/test/components/CustomizeView.java index 6aaac8960f..212a7590ea 100644 --- a/src/org/labkey/test/components/CustomizeView.java +++ b/src/org/labkey/test/components/CustomizeView.java @@ -390,10 +390,17 @@ private void addItem(CharSequence fieldKey, ViewItemType type) // Expand all nodes necessary to reveal the desired node. WebElement fieldRow = expandPivots(fieldKey); - // Just click the checkbox, don't need to click the row. - WebElement checkbox = Locator.css("input[type=button]").findElement(fieldRow); + WebElement checkbox = Locator.css("input[type=button]").refindWhenNeeded(fieldRow); + + // In some situations calling Checkbox(checkbox).check() doesn't always check the checkbox. Verify that it has + // been checked, and if not try again. ScrollUtils.scrollIntoView(checkbox); new Checkbox(checkbox).check(); + if (!new Checkbox(checkbox).isChecked()) + { + new Checkbox(checkbox).check(); + } + itemXPath(type, fieldKey).waitForElement(this, 2_000); } diff --git a/src/org/labkey/test/components/ui/notifications/ServerNotificationMenu.java b/src/org/labkey/test/components/ui/notifications/ServerNotificationMenu.java index 55b727db29..42fc0dc958 100644 --- a/src/org/labkey/test/components/ui/notifications/ServerNotificationMenu.java +++ b/src/org/labkey/test/components/ui/notifications/ServerNotificationMenu.java @@ -198,7 +198,7 @@ private WebElement waitForNotificationList() // Find the container again, don't return listContainer WebElement previously found. If the list was slow to // update with the most recent notification the old reference will be stale. - return notificationsContainerLocator.waitForElement(elementCache().menuContent, 1_000); + return notificationsContainerLocator.refindWhenNeeded((elementCache().menuContent)); } /**