Skip to content

Commit e352fa7

Browse files
Try to address issue with customizing grid view in LKS. (#2816)
1 parent b17078f commit e352fa7

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

src/org/labkey/test/components/CustomizeView.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -390,11 +390,17 @@ private void addItem(CharSequence fieldKey, ViewItemType type)
390390

391391
// Expand all nodes necessary to reveal the desired node.
392392
WebElement fieldRow = expandPivots(fieldKey);
393-
WebElement checkbox = Locator.css("input[type=button]").findElement(fieldRow);
394-
WebElement rowLabel = Locator.byClass("x4-tree-node-text").findElement(fieldRow);
395-
rowLabel.click();
393+
WebElement checkbox = Locator.css("input[type=button]").refindWhenNeeded(fieldRow);
394+
395+
// In some situations calling Checkbox(checkbox).check() doesn't always check the checkbox. Verify that it has
396+
// been checked, and if not try again.
396397
ScrollUtils.scrollIntoView(checkbox);
397398
new Checkbox(checkbox).check();
399+
if (!new Checkbox(checkbox).isChecked())
400+
{
401+
new Checkbox(checkbox).check();
402+
}
403+
398404
itemXPath(type, fieldKey).waitForElement(this, 2_000);
399405
}
400406

src/org/labkey/test/components/ui/notifications/ServerNotificationMenu.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ private WebElement waitForNotificationList()
198198

199199
// Find the container again, don't return listContainer WebElement previously found. If the list was slow to
200200
// update with the most recent notification the old reference will be stale.
201-
return notificationsContainerLocator.waitForElement(elementCache().menuContent, 1_000);
201+
return notificationsContainerLocator.refindWhenNeeded((elementCache().menuContent));
202202
}
203203

204204
/**

0 commit comments

Comments
 (0)