From d26983c09566b3af7e5afc1fd55b9a85bdcfb3f9 Mon Sep 17 00:00:00 2001 From: Daria Bodiakova <70635654+DariaBod@users.noreply.github.com> Date: Thu, 3 Sep 2026 15:38:04 -0700 Subject: [PATCH] fix test --- .../labkey/test/components/ui/grids/EditableGrid.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/org/labkey/test/components/ui/grids/EditableGrid.java b/src/org/labkey/test/components/ui/grids/EditableGrid.java index a627f0bdd9..6ebfc7c136 100644 --- a/src/org/labkey/test/components/ui/grids/EditableGrid.java +++ b/src/org/labkey/test/components/ui/grids/EditableGrid.java @@ -1150,7 +1150,8 @@ private void selectCell(WebElement cell) private void activateCell(WebElement cell) { // If it is a selector, and it already has focus (is active), it will not have a div.cellular-display - if (Locator.tagWithClass("div", "select-input__control--is-focused").findElements(cell).isEmpty()) + if (Locators.focusedSelect.findElements(cell).isEmpty() + && Locators.inputCell.findElements(cell).isEmpty()) sendKeysToCell(cell, Keys.ENTER); } @@ -1178,9 +1179,8 @@ public boolean isCellSelected(WebElement cell) catch (NoSuchElementException nse) { // If the cell is an open/active reactSelect the class attribute is different. - return Locator.tagWithClass("div", "select-input__control") - .findElement(cell) - .getDomAttribute("class").contains("select-input__control--is-focused"); + return !Locators.focusedSelect.findElements(cell).isEmpty() + || !Locators.inputCell.findElements(cell).isEmpty(); } } @@ -1433,6 +1433,7 @@ private Locators() static final Locator.XPathLocator rows = Locator.tag("tbody").childTag("tr").withoutClass("grid-empty").withoutClass("grid-loading"); static final Locator headerCells = Locator.css("thead tr th"); static final Locator inputCell = Locator.css(".eg-input-cell"); + static final Locator focusedSelect = Locator.tagWithClass("div", "select-input__control--is-focused"); static final Locator popover = Locator.byClass("popover"); }