Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/org/labkey/test/components/ui/grids/ResponsiveGrid.java
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ public void clickColumnMenuItem(CharSequence columnIdentifier, String menuText,
WebElement menu = Locator.css("ul.grid-header-cell__dropdown-menu.open").findWhenNeeded(getDriver());
WebElement menuItem = Locator.css("li > a").containing(menuText).findWhenNeeded(menu);
waitFor(menuItem::isDisplayed, 1000);
dismissPopover();
if (waitForUpdate)
doAndWaitForUpdate(menuItem::click);
else
Expand Down Expand Up @@ -800,6 +801,17 @@ public Optional<String> getGridEmptyMessage()
return msg;
}

public void dismissPopover()
{
getWrapper().mouseOut();
Locators.popover.findOptionalElement(getDriver()).ifPresent(popover -> {
getWrapper().mouseOver(popover);
getWrapper().mouseOut();
getWrapper().mouseOver(elementCache().getGridHeaderManager().getColumnHeader(0).getElement());
getWrapper().shortWait().until(ExpectedConditions.invisibilityOf(popover));
});
}

public List<FieldReference> getHeaders()
{
return Collections.unmodifiableList(elementCache().findHeaders());
Expand Down Expand Up @@ -971,6 +983,7 @@ static public Locator.XPathLocator responsiveGridByBaseId(String baseGridId)
static final Locator emptyGrid = Locator.css("tbody tr.grid-empty");
static final Locator spinner = Locator.byClass("fa-spinner");
static final Locator headerCells = Locator.tagWithClass("th", "grid-header-cell");
static final Locator popover = Locator.byClass("popover");
static public Locator.XPathLocator headerCellBody(String label)
{
return Locator.tagWithClass("div", "grid-header-cell__body")
Expand Down