From 258cd1d23d390a06c7d8b47a379f0fc81a5cd525 Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Tue, 3 Nov 2026 12:42:10 -0800 Subject: [PATCH 01/37] Firefox 153 fixes --- src/org/labkey/test/WebDriverWrapper.java | 1 + src/org/labkey/test/components/html/SiteNavBar.java | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/org/labkey/test/WebDriverWrapper.java b/src/org/labkey/test/WebDriverWrapper.java index 1effae6b41..4c2fa4eca6 100644 --- a/src/org/labkey/test/WebDriverWrapper.java +++ b/src/org/labkey/test/WebDriverWrapper.java @@ -364,6 +364,7 @@ protected Pair createNewWebDriver(@NotNull Pair Date: Tue, 3 Nov 2026 13:08:29 -0800 Subject: [PATCH 02/37] Temporarily hard-code firefox version --- src/org/labkey/test/WebDriverWrapper.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/org/labkey/test/WebDriverWrapper.java b/src/org/labkey/test/WebDriverWrapper.java index 4c2fa4eca6..8d68717ba5 100644 --- a/src/org/labkey/test/WebDriverWrapper.java +++ b/src/org/labkey/test/WebDriverWrapper.java @@ -401,9 +401,6 @@ protected Pair createNewWebDriver(@NotNull Pair createNewWebDriver(@NotNull Pair Date: Tue, 3 Nov 2026 16:02:41 -0800 Subject: [PATCH 03/37] Make firefox version lock only on TeamCity --- src/org/labkey/test/WebDriverWrapper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/labkey/test/WebDriverWrapper.java b/src/org/labkey/test/WebDriverWrapper.java index 8d68717ba5..4dc30b1be9 100644 --- a/src/org/labkey/test/WebDriverWrapper.java +++ b/src/org/labkey/test/WebDriverWrapper.java @@ -410,7 +410,7 @@ protected Pair createNewWebDriver(@NotNull Pair Date: Tue, 3 Nov 2026 16:03:02 -0800 Subject: [PATCH 04/37] Wait for search input to stop animating --- src/org/labkey/test/components/html/SiteNavBar.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/org/labkey/test/components/html/SiteNavBar.java b/src/org/labkey/test/components/html/SiteNavBar.java index 64f0ac0dd7..1062d5f0ac 100644 --- a/src/org/labkey/test/components/html/SiteNavBar.java +++ b/src/org/labkey/test/components/html/SiteNavBar.java @@ -30,6 +30,7 @@ import org.labkey.test.pages.search.SearchResultsPage; import org.labkey.test.pages.user.ShowUsersPage; import org.labkey.test.util.AbstractUserHelper; +import org.labkey.test.util.LabKeyExpectedConditions; import org.labkey.test.util.LogMethod; import org.labkey.test.util.LoggedParam; import org.openqa.selenium.NoSuchElementException; @@ -184,6 +185,7 @@ public WebElement expandSearchBar() { elementCache().searchToggle.click(); WebDriverWrapper.waitFor(this::isSearchBarExpanded, "Search bar didn't expand", WebDriverWrapper.WAIT_FOR_JAVASCRIPT); + getWrapper().shortWait().until(LabKeyExpectedConditions.animationIsDone(elementCache().searchInput)); } return elementCache().searchInput; } From 23ca0f30aeca6a2bfc2c422b9b3e78b8e6d56ec3 Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Tue, 3 Nov 2026 16:09:43 -0800 Subject: [PATCH 05/37] Wait for color picker --- .../test/components/ColorPickerInput.java | 39 ++++++++++++------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/src/org/labkey/test/components/ColorPickerInput.java b/src/org/labkey/test/components/ColorPickerInput.java index c57412efeb..f034b019ac 100644 --- a/src/org/labkey/test/components/ColorPickerInput.java +++ b/src/org/labkey/test/components/ColorPickerInput.java @@ -17,13 +17,11 @@ import org.labkey.test.Locator; import org.labkey.test.components.html.Input; -import org.openqa.selenium.NoSuchElementException; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.Color; -import java.util.List; - -public class ColorPickerInput extends WebDriverComponent.ElementCache> +public class ColorPickerInput extends WebDriverComponent { private final WebDriver _driver; final WebElement _componentElement; @@ -47,20 +45,31 @@ protected WebDriver getDriver() public void setHexValue(String hexValue) { - List inputs = Locator.tag("input").findElements(this); - if (inputs.isEmpty()) - throw new NoSuchElementException("Input tag not found in color picker"); - WebElement hexInput = inputs.getFirst(); - new Input(hexInput, getDriver()).setWithPaste(hexValue); + setColor(Color.fromString(hexValue)); + } + + public void setColor(Color color) + { + elementCache().hexInput.setWithPaste(color.asHex()); + getWrapper().quickWait().until(_ -> getSelectedColor().equals(color)); + } + + public Color getSelectedColor() + { + return Color.fromString(elementCache().selectedColorDiv.getCssValue("background")); + } + + @Override + protected ElementCache newElementCache() + { + return new ElementCache(); } - public String getHexValue() + protected class ElementCache extends Component.ElementCache { - List inputs = Locator.tag("input").findElements(this); - if (inputs.isEmpty()) - throw new NoSuchElementException("Input tag not found in color picker"); - WebElement hexInput = inputs.getFirst(); - return new Input(hexInput, getDriver()).getValue(); + final WebElement inputFooter = Locator.byClass("flexbox-fix").findWhenNeeded(this); + final WebElement selectedColorDiv = Locator.tag("div").findWhenNeeded(inputFooter); + final Input hexInput = Input.Input(Locator.tag("input").withLabel("hex"), getDriver()).findWhenNeeded(inputFooter); } public static class ColorPickerInputFinder extends WebDriverComponentFinder From 33b8e3e92ad72c6e273722a515dc5852021ee904 Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Tue, 3 Nov 2026 16:10:46 -0800 Subject: [PATCH 06/37] Wait for domain designer errors to update --- .../components/domain/BaseDomainDesigner.java | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/org/labkey/test/components/domain/BaseDomainDesigner.java b/src/org/labkey/test/components/domain/BaseDomainDesigner.java index 1ed53cb344..a7212263f2 100644 --- a/src/org/labkey/test/components/domain/BaseDomainDesigner.java +++ b/src/org/labkey/test/components/domain/BaseDomainDesigner.java @@ -17,9 +17,11 @@ import org.labkey.test.BootstrapLocators; import org.labkey.test.Locator; +import org.labkey.test.WebDriverWrapper; import org.labkey.test.components.Component; import org.labkey.test.components.WebDriverComponent; import org.labkey.test.util.selenium.ScrollUtils; +import org.openqa.selenium.StaleElementReferenceException; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; @@ -89,8 +91,27 @@ public Object clickSave() public List clickSaveExpectingErrors() { + List previousErrors = getErrors(); elementCache().saveButton.click(); - return getWrapper().getTexts(BootstrapLocators.errorBanner.waitForElements(getWrapper().shortWait())).stream() + // The error banner is updated in place rather than re-rendered, so wait for its text to change + return WebDriverWrapper.waitFor(() -> { + try + { + List errors = getErrors(); + return !errors.isEmpty() && !errors.equals(previousErrors) ? errors : null; + } + catch (StaleElementReferenceException ignore) + { + return null; + } + }, + () -> "Save didn't produce new errors. Previous errors: " + previousErrors + ". ", + WebDriverWrapper.WAIT_FOR_JAVASCRIPT); + } + + private List getErrors() + { + return getWrapper().getTexts(BootstrapLocators.errorBanner.findElements(getDriver())).stream() .map(String::trim) .collect(Collectors.toList()); } From 1f35e95f26e2f6d2834db4863234d33acfa5edc7 Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Thu, 5 Nov 2026 11:44:07 -0800 Subject: [PATCH 07/37] GH Issue 1793: Fix chart field selection, data views sort, and overlapping alias tests on Firefox 153 Retry dropped clicks on chart wizard field areas, wait for the data views grid to reload after sorting, and avoid back-to-back identical domain designer errors. --- .../test/components/ChartTypeDialog.java | 13 +++++++------ src/org/labkey/test/tests/DataViewsTest.java | 7 +++++-- src/org/labkey/test/tests/SampleTypeTest.java | 19 +++++++++++-------- 3 files changed, 23 insertions(+), 16 deletions(-) diff --git a/src/org/labkey/test/components/ChartTypeDialog.java b/src/org/labkey/test/components/ChartTypeDialog.java index d0e91e37c7..36701694da 100644 --- a/src/org/labkey/test/components/ChartTypeDialog.java +++ b/src/org/labkey/test/components/ChartTypeDialog.java @@ -20,7 +20,6 @@ import org.labkey.test.pages.TimeChartWizard; import org.labkey.test.selenium.LazyWebElement; import org.labkey.test.util.Ext4Helper; -import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.ui.ExpectedConditions; @@ -334,12 +333,14 @@ private ChartTypeDialog setValue(WebElement target, String columnName, String co WebElement column = elementCache().getColumn(columnName, columnGridCls); getWrapper().scrollIntoView(column); column.click(); - getWrapper(); + WebDriverWrapper.waitFor(target::isDisplayed, "Target element is not displayed", 5000); + Locator.XPathLocator selectionText = Locator.xpath("../div[contains(@class, 'field-area')]//div[contains(@class, 'field-selection-text')]"); + List previousSelection = selectionText.findElements(target); + // Firefox 153 sometimes drops the click on the field area, so retry until the selection re-renders WebDriverWrapper.waitFor(() -> { - return target.isDisplayed(); - }, "Target element is not displayed", 5000); - getWrapper().actionClick(target); // The drop text may be obscured, just need to click the location - getWrapper().waitForFormElementToNotEqual(target.findElement(By.xpath("//div[contains(@class, 'field-selection-text')]")), columnName); + getWrapper().actionClick(target); // The drop text may be obscured, just need to click the location + return WebDriverWrapper.waitFor(() -> selectionText.findElements(target).stream().anyMatch(el -> !previousSelection.contains(el)), 1000); + }, "Column '" + columnName + "' was not applied to the field area", WAIT_FOR_JAVASCRIPT); return this; } diff --git a/src/org/labkey/test/tests/DataViewsTest.java b/src/org/labkey/test/tests/DataViewsTest.java index 398ad235de..cf962720fc 100644 --- a/src/org/labkey/test/tests/DataViewsTest.java +++ b/src/org/labkey/test/tests/DataViewsTest.java @@ -476,12 +476,15 @@ public void sortDataViewsTest() waitFor(alphabeticalRadio::isChecked, "Radio button 'Alphabetical' did not become checked after clicking.", 2000); clickButton("Save", 0); _ext4Helper.waitForMaskToDisappear(); - assertTextPresentInThisOrder(CATEGORIES[0], "Abbreviated Demographics", "Alt ID mapping", "APX-1: Abbreviated Physical Exam", + String[] expectedTopCategoryOrder = {CATEGORIES[0], "Abbreviated Demographics", "Alt ID mapping", "APX-1: Abbreviated Physical Exam", "Crosstab: MouseId Counts", "DEM-1: Demographics", "FPX-1: Final Complete Physical Exam", "PRE-1: Pre-Existing Conditions", "R Report: Dataset Column Names", "RCP-1: Reactogenicity-Resolution", "Scatter: Systolic vs Diastolic", "SCL-1: Specimen Collection", "Time Chart: Body Temp + Pulse For Group 2", "Types", - "VAC-1: Post-enrollment Vaccination", "verifyAssay"); + "VAC-1: Post-enrollment Vaccination", "verifyAssay"}; + // The grid reloads asynchronously after the save mask is removed + if (!waitFor(() -> isPresentInThisOrder(expectedTopCategoryOrder) == null, WAIT_FOR_JAVASCRIPT)) + assertTextPresentInThisOrder(expectedTopCategoryOrder); // check if bottom category sorts Alphabetical assertTextPresentInThisOrder(CATEGORIES[4], "ENR-1: Enrollment", "EPX-1: Enrollment Abbreviated Physical Exam", diff --git a/src/org/labkey/test/tests/SampleTypeTest.java b/src/org/labkey/test/tests/SampleTypeTest.java index 759ffe0724..68807763fb 100644 --- a/src/org/labkey/test/tests/SampleTypeTest.java +++ b/src/org/labkey/test/tests/SampleTypeTest.java @@ -325,14 +325,7 @@ public void testOverlappingAliases() containsString("You have 2 field errors.")); checker().screenShotIfNewError("duplicateImportAlias"); - log("Aliases differing only by case are still duplicates."); - createPage = new CreateSampleTypePage(this.getDriver()); - fieldsPanel.getField(fieldTwo).setImportAliases(sharedAlias.toUpperCase()); - checker().verifyThat("Expected an error when two fields share an import alias differing only by case", - String.join("\n", createPage.clickSaveExpectingErrors()), - containsString("You have 2 field errors.")); - checker().screenShotIfNewError("duplicateImportAliasIgnoringCase"); - + // Interleave the scenarios so consecutive saves don't produce identical errors log("Verify there can be no import aliases that collide with field names (case-insensitive)."); createPage = new CreateSampleTypePage(this.getDriver()); fieldsPanel.getField(fieldTwo).setImportAliases(""); @@ -342,8 +335,18 @@ public void testOverlappingAliases() containsString("Import alias '" + fieldTwo + "' on field '" + fieldOne + "' conflicts with a field name.")); checker().screenShotIfNewError("importAliasConflictsWithFieldName"); + log("Aliases differing only by case are still duplicates."); + createPage = new CreateSampleTypePage(this.getDriver()); + fieldsPanel.getField(fieldOne).setImportAliases(sharedAlias); + fieldsPanel.getField(fieldTwo).setImportAliases(sharedAlias.toUpperCase()); + checker().verifyThat("Expected an error when two fields share an import alias differing only by case", + String.join("\n", createPage.clickSaveExpectingErrors()), + containsString("You have 2 field errors.")); + checker().screenShotIfNewError("duplicateImportAliasIgnoringCase"); + log("An alias that matches a field name except for case is still a conflict."); createPage = new CreateSampleTypePage(this.getDriver()); + fieldsPanel.getField(fieldTwo).setImportAliases(""); fieldsPanel.getField(fieldOne).setImportAliases(fieldTwo.toLowerCase()); checker().verifyThat("Expected an error when an import alias matches another field's name except for case", String.join("\n", createPage.clickSaveExpectingErrors()), From 94b3036dfa7cd9face6025eb7310d55920aa6fa3 Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Thu, 5 Nov 2026 13:07:15 -0800 Subject: [PATCH 08/37] GH Issue 1793: Give delete confirmation dialog more time to become ready --- src/org/labkey/test/components/ui/DeleteConfirmationDialog.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/labkey/test/components/ui/DeleteConfirmationDialog.java b/src/org/labkey/test/components/ui/DeleteConfirmationDialog.java index 2e045a6cba..4c0c86848e 100644 --- a/src/org/labkey/test/components/ui/DeleteConfirmationDialog.java +++ b/src/org/labkey/test/components/ui/DeleteConfirmationDialog.java @@ -86,7 +86,7 @@ protected void waitForReady() WebDriverWrapper.waitFor(()-> elementCache().body.isDisplayed() && !elementCache().title.getText().isEmpty() && !BootstrapLocators.loadingSpinner.existsIn(this), - "The delete confirmation dialog did not become ready.", 1_000); + "The delete confirmation dialog did not become ready.", 2_500); } public DeleteConfirmationDialog setSkipAuditEventCheck(boolean skipAuditEventCheck) From 6423b8d9681c512d0429a088961d6612b17bf57d Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Thu, 5 Nov 2026 13:52:00 -0800 Subject: [PATCH 09/37] GH Issue 1793: Dismiss lingering Current Page tooltip after using the pager menu --- src/org/labkey/test/components/ui/Pager.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/org/labkey/test/components/ui/Pager.java b/src/org/labkey/test/components/ui/Pager.java index 1a90ef34c9..45e6b5ab18 100644 --- a/src/org/labkey/test/components/ui/Pager.java +++ b/src/org/labkey/test/components/ui/Pager.java @@ -58,6 +58,7 @@ public Pager jumpToPage(String jumpTo) // only works on GridPanel { _pagedComponent.doAndWaitForUpdate(()-> elementCache().jumpToDropdown.clickSubMenu(false, jumpTo)); + dismissCurrentPageTooltip(); return this; } @@ -86,6 +87,7 @@ public boolean isLastPageAvailable() finally { menu.collapse(); + dismissCurrentPageTooltip(); } } @@ -115,6 +117,7 @@ public boolean isCountAllRowsAvailable() finally { menu.collapse(); + dismissCurrentPageTooltip(); } } @@ -124,6 +127,7 @@ public Pager countAllRows() // Wait for the exact total to render: the summary shows "... of N" (no capped "+"). The total is briefly hidden // behind a spinner while counting, so require the " of " to be back before checking that the "+" is gone. elementCache().jumpToDropdown.clickSubMenu(false, COUNT_ALL_ROWS_OPTION); + dismissCurrentPageTooltip(); WebDriverWrapper.waitFor(() -> summary().contains(" of ") && !summary().contains("+"), "Exact count did not load", 30_000); @@ -169,10 +173,19 @@ private int pageSize(String pageSize) // only works on GridPanel { elementCache().jumpToDropdown.collapse(); } + dismissCurrentPageTooltip(); return initialSize; } + // Closing the menu removes the hovered element, so Firefox never sends the mouseleave that hides the 'Current Page' tooltip + private void dismissCurrentPageTooltip() + { + getWrapper().mouseOverWithoutScrolling(elementCache().currentPageButton); + getWrapper().mouseOut(); + getWrapper().waitForElementToDisappear(Locator.id("view-menu-tooltip")); + } + /** * Helper to see if the paging menu is visible. * Basically this is to check issue 45451. From 127f473f19c484582b89440803cff929e8b8e786 Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Fri, 6 Nov 2026 13:34:13 -0800 Subject: [PATCH 10/37] GH Issue 1793: Don't fail when the pager tooltip lingers --- src/org/labkey/test/components/ui/Pager.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/org/labkey/test/components/ui/Pager.java b/src/org/labkey/test/components/ui/Pager.java index 45e6b5ab18..5173674a93 100644 --- a/src/org/labkey/test/components/ui/Pager.java +++ b/src/org/labkey/test/components/ui/Pager.java @@ -178,12 +178,11 @@ private int pageSize(String pageSize) // only works on GridPanel return initialSize; } - // Closing the menu removes the hovered element, so Firefox never sends the mouseleave that hides the 'Current Page' tooltip + // The 'Current Page' tooltip can linger on Firefox after Selenium interacts with the pager, covering neighboring controls private void dismissCurrentPageTooltip() { getWrapper().mouseOverWithoutScrolling(elementCache().currentPageButton); getWrapper().mouseOut(); - getWrapper().waitForElementToDisappear(Locator.id("view-menu-tooltip")); } /** From cae96c53973117b2495ad6d7a5d84d6b7c268cb2 Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Fri, 6 Nov 2026 14:02:51 -0800 Subject: [PATCH 11/37] GH Issue 1793: Temporary geckodriver debug logging --- src/org/labkey/test/WebDriverWrapper.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/org/labkey/test/WebDriverWrapper.java b/src/org/labkey/test/WebDriverWrapper.java index 4dc30b1be9..50292995f4 100644 --- a/src/org/labkey/test/WebDriverWrapper.java +++ b/src/org/labkey/test/WebDriverWrapper.java @@ -406,7 +406,8 @@ protected Pair createNewWebDriver(@NotNull Pair createNewWebDriver(@NotNull Pair Date: Fri, 6 Nov 2026 14:52:50 -0800 Subject: [PATCH 12/37] GH Issue 1793: Disable the Firefox GPU process on Windows --- src/org/labkey/test/WebDriverWrapper.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/org/labkey/test/WebDriverWrapper.java b/src/org/labkey/test/WebDriverWrapper.java index 50292995f4..a0b22a3d75 100644 --- a/src/org/labkey/test/WebDriverWrapper.java +++ b/src/org/labkey/test/WebDriverWrapper.java @@ -18,6 +18,7 @@ import org.apache.commons.collections4.MultiValuedMap; import org.apache.commons.collections4.multimap.HashSetValuedHashMap; import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.SystemUtils; import org.apache.commons.lang3.mutable.MutableInt; import org.apache.commons.lang3.tuple.ImmutablePair; import org.apache.commons.lang3.tuple.Pair; @@ -409,6 +410,11 @@ protected Pair createNewWebDriver(@NotNull Pair Date: Fri, 6 Nov 2026 14:28:10 -0800 Subject: [PATCH 13/37] GH Issue 1793: Wait for template options before checking Include Subfolders --- src/org/labkey/test/pages/admin/CreateSubFolderPage.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/org/labkey/test/pages/admin/CreateSubFolderPage.java b/src/org/labkey/test/pages/admin/CreateSubFolderPage.java index c505fa6d3f..3d9964aad4 100644 --- a/src/org/labkey/test/pages/admin/CreateSubFolderPage.java +++ b/src/org/labkey/test/pages/admin/CreateSubFolderPage.java @@ -18,9 +18,12 @@ import org.labkey.test.Locator; import org.labkey.test.components.html.Checkbox; import org.labkey.test.pages.LabKeyPage; +import org.labkey.test.util.LabKeyExpectedConditions; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; +import static org.labkey.test.components.ext4.Checkbox.Ext4Checkbox; + public class CreateSubFolderPage extends LabKeyPage { public CreateSubFolderPage(WebDriver test) @@ -70,7 +73,10 @@ public CreateSubFolderPage createFromTemplateFolder(String templateFolder) _ext4Helper.selectComboBoxItem(Locator.xpath("//div") .withClass("labkey-wizard-header") .withText("Choose Template Folder:").append("/following-sibling::table[contains(@id, 'combobox')]"), templateFolder); - _ext4Helper.checkCheckbox("Include Subfolders"); + Checkbox includeSubfolders = Ext4Checkbox().withLabel("Include Subfolders").waitFor(getDriver()); + // The template options animate in after a template is chosen + shortWait().until(LabKeyExpectedConditions.animationIsDone(includeSubfolders.getComponentElement())); + includeSubfolders.check(); return this; } From 950c998dd7ff15478657f46697ca39211358f8a2 Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Mon, 9 Nov 2026 18:47:14 -0800 Subject: [PATCH 14/37] Wait for the Manage Views list to reload after deleting a view Clicking another view's delete during the reload loses its confirmation. --- .../components/ui/grids/ManageViewsDialog.java | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/org/labkey/test/components/ui/grids/ManageViewsDialog.java b/src/org/labkey/test/components/ui/grids/ManageViewsDialog.java index df3b654286..96f05610ac 100644 --- a/src/org/labkey/test/components/ui/grids/ManageViewsDialog.java +++ b/src/org/labkey/test/components/ui/grids/ManageViewsDialog.java @@ -35,6 +35,7 @@ */ public class ManageViewsDialog extends ModalDialog { + private String _pendingDeleteView; public ManageViewsDialog(WebDriver driver) { @@ -124,6 +125,7 @@ public ManageViewsDialog deleteView(String viewName) Assert.assertTrue(String.format("View named '%s' cannot be deleted.", viewName), canViewBeDeleted(viewName)); Locator.tagWithClass("i", "fa-trash-o").findElement(elementCache().viewRow(viewName)).click(); + _pendingDeleteView = viewName; return this; } @@ -162,6 +164,13 @@ public ManageViewsDialog confirmDelete() WebElement deleteYesButton = elementCache().deleteYesButton; deleteYesButton.click(); getWrapper().quickWait().until(ExpectedConditions.stalenessOf(deleteYesButton)); + if (_pendingDeleteView != null) + { + // The confirmation closes before the view list reloads, and that reload discards any newer confirmation + Locator deletedRow = elementCache().viewRowLoc(_pendingDeleteView); + getWrapper().shortWait().until(wd -> deletedRow.findElements(this).isEmpty()); + _pendingDeleteView = null; + } return this; } @@ -175,6 +184,7 @@ public ManageViewsDialog cancelDelete() WebElement deleteNoButton = elementCache().deleteNoButton; deleteNoButton.click(); getWrapper().quickWait().until(ExpectedConditions.stalenessOf(deleteNoButton)); + _pendingDeleteView = null; return this; } @@ -250,7 +260,12 @@ protected List viewRows() protected WebElement viewRow(String viewName) { - return Locator.tagWithText("div", viewName).parent("div").withClass("row").findElement(this); + return viewRowLoc(viewName).findElement(this); + } + + protected Locator viewRowLoc(String viewName) + { + return Locator.tagWithText("div", viewName).parent("div").withClass("row"); } protected final WebElement viewNameInput = Locator.tagWithName("input", "gridViewName") From eb82f33073cfd114452b8201487ad451baf45a5d Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Mon, 9 Nov 2026 18:47:14 -0800 Subject: [PATCH 15/37] Wait for Revert to become available after making a view the default --- src/org/labkey/test/components/ui/grids/ManageViewsDialog.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/org/labkey/test/components/ui/grids/ManageViewsDialog.java b/src/org/labkey/test/components/ui/grids/ManageViewsDialog.java index 96f05610ac..72d1fa00c3 100644 --- a/src/org/labkey/test/components/ui/grids/ManageViewsDialog.java +++ b/src/org/labkey/test/components/ui/grids/ManageViewsDialog.java @@ -234,6 +234,8 @@ public boolean canDefaultBeReverted() public ManageViewsDialog makeViewDefault(String viewName) { Locator.tagWithText("button", "Make default").findElement(elementCache().viewRow(viewName)).click(); + // The saved default is enabled for revert once the view list reloads + var _ = WebDriverWrapper.waitFor(() -> Locator.tagWithText("button", "Revert").withClass("clickable-text").existsIn(this), WebDriverWrapper.WAIT_FOR_JAVASCRIPT); return this; } From 728c1d9457fc5e9fd126e0e74fdfa56116889f3a Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Mon, 9 Nov 2026 18:47:14 -0800 Subject: [PATCH 16/37] Wait for modal dialog buttons to render before dismissing --- src/org/labkey/test/components/bootstrap/ModalDialog.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/org/labkey/test/components/bootstrap/ModalDialog.java b/src/org/labkey/test/components/bootstrap/ModalDialog.java index abb940a100..07b4985acb 100644 --- a/src/org/labkey/test/components/bootstrap/ModalDialog.java +++ b/src/org/labkey/test/components/bootstrap/ModalDialog.java @@ -128,7 +128,11 @@ public void dismiss(String buttonText) /* for synchronous operations that take time, the caller can specify how long to wait */ public void dismiss(String buttonText, Integer waitSeconds) { - Locators.dismissButton(buttonText).findElement(getComponentElement()).click(); + // Dialogs may render their buttons after loading their content + WebElement button = Locators.dismissButton(buttonText).findWhenNeeded(getComponentElement()); + new WebDriverWait(getDriver(), Duration.ofMillis(WAIT_FOR_JAVASCRIPT)) + .until(ExpectedConditions.elementToBeClickable(button)); + button.click(); waitForClose(waitSeconds); } From df4ea5c8f777cc9e92e70d511230756fc41d571b Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Mon, 9 Nov 2026 18:47:14 -0800 Subject: [PATCH 17/37] Wait for chart previews to finish redrawing after a config change --- .../labkey/test/components/react/QueryChartDialog.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/org/labkey/test/components/react/QueryChartDialog.java b/src/org/labkey/test/components/react/QueryChartDialog.java index bf603f6b2f..da075a3f13 100644 --- a/src/org/labkey/test/components/react/QueryChartDialog.java +++ b/src/org/labkey/test/components/react/QueryChartDialog.java @@ -334,12 +334,21 @@ public List getYAxisSelectionOptions() private void doAndWaitForPreview(Runnable action) { + waitForPreviewToLoad(); WebElement svg = isPreviewPresent() ? elementCache().svg() : null; action.run(); // preview might not appear after action, but it will definitely go stale. if (svg != null) getWrapper().shortWait().until(ExpectedConditions.stalenessOf(svg)); + waitForPreviewToLoad(); + } + + // Each config change re-queries the preview data, and every response redraws the preview + private void waitForPreviewToLoad() + { + WebDriverWrapper.waitFor(() -> !elementCache().previewLoadingLoc.existsIn(elementCache().previewContainer()), + "The chart preview did not finish loading.", WebDriverWrapper.WAIT_FOR_JAVASCRIPT); } public QueryChartDialog selectYAxisAggregateMethod(String option) @@ -808,6 +817,7 @@ public String grayTextPreviewInstruction() } private final Locator previewBodyLoc = Locator.tagWithClass("div", "chart-builder-preview-body"); + private final Locator previewLoadingLoc = Locator.tagWithClass("div", "chart-loading-mask"); private final Locator svgLoc = Locator.tagWithClass("div", "svg-chart__chart").childTag("svg"); private final Locator svgErrorLoc = Locator.tagWithClass("div", "svg-chart__chart").childTag("div"); From eaa7b37334c561cb0a99bb8d815f29bf74404e6d Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Mon, 9 Nov 2026 18:47:14 -0800 Subject: [PATCH 18/37] Allow delete confirmation dialogs more time to load --- src/org/labkey/test/components/ui/DeleteConfirmationDialog.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/labkey/test/components/ui/DeleteConfirmationDialog.java b/src/org/labkey/test/components/ui/DeleteConfirmationDialog.java index 4c0c86848e..16ff631697 100644 --- a/src/org/labkey/test/components/ui/DeleteConfirmationDialog.java +++ b/src/org/labkey/test/components/ui/DeleteConfirmationDialog.java @@ -86,7 +86,7 @@ protected void waitForReady() WebDriverWrapper.waitFor(()-> elementCache().body.isDisplayed() && !elementCache().title.getText().isEmpty() && !BootstrapLocators.loadingSpinner.existsIn(this), - "The delete confirmation dialog did not become ready.", 2_500); + "The delete confirmation dialog did not become ready.", WebDriverWrapper.WAIT_FOR_JAVASCRIPT); } public DeleteConfirmationDialog setSkipAuditEventCheck(boolean skipAuditEventCheck) From c17e29104ff6d6839d9815ada1cea63ca22cb3bb Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Mon, 9 Nov 2026 18:47:14 -0800 Subject: [PATCH 19/37] Retry the naming pattern help hover until its popover shows --- .../ui/domainproperties/EntityTypeDesigner.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/org/labkey/test/components/ui/domainproperties/EntityTypeDesigner.java b/src/org/labkey/test/components/ui/domainproperties/EntityTypeDesigner.java index 9a691a6445..68bbf00703 100644 --- a/src/org/labkey/test/components/ui/domainproperties/EntityTypeDesigner.java +++ b/src/org/labkey/test/components/ui/domainproperties/EntityTypeDesigner.java @@ -148,8 +148,12 @@ public T setNameExpression(String nameExpression) public String getNameExpressionPreview() { - getWrapper().mouseOver(elementCache().helpTarget("Naming ")); - waitFor(()->elementCache().popover.isDisplayed(), "No tooltip was shown for the Name Expression.", 1_000); + // A hover can miss if a banner shifts the layout while it lands + waitFor(() -> { + getWrapper().mouseOut(); + getWrapper().mouseOver(elementCache().helpTarget("Naming ")); + return waitFor(() -> elementCache().popover.isDisplayed(), 1_000); + }, "No tooltip was shown for the Naming Pattern.", 5_000); return elementCache().popover.getText(); } From 69e126d355a75eb0c7f693738386028ba9fb0eb3 Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Mon, 9 Nov 2026 18:47:14 -0800 Subject: [PATCH 20/37] Keep checking tab selection while the tab's row count reloads --- .../test/components/ui/grids/TabbedGridPanel.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/org/labkey/test/components/ui/grids/TabbedGridPanel.java b/src/org/labkey/test/components/ui/grids/TabbedGridPanel.java index 0526e63cd6..e1de715977 100644 --- a/src/org/labkey/test/components/ui/grids/TabbedGridPanel.java +++ b/src/org/labkey/test/components/ui/grids/TabbedGridPanel.java @@ -20,6 +20,7 @@ import org.labkey.test.components.Component; import org.labkey.test.components.WebDriverComponent; import org.labkey.test.components.react.MultiMenu; +import org.openqa.selenium.NoSuchElementException; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.ui.ExpectedConditions; @@ -137,7 +138,17 @@ public QueryGrid selectGrid(String tabText) var tab = elementCache().navTab(tabText); getWrapper().shortWait().until(ExpectedConditions.elementToBeClickable(tab)); tab.click(); - WebDriverWrapper.waitFor(()-> isSelected(tabText), "tab did not become selected in time", 2000); + WebDriverWrapper.waitFor(() -> { + try + { + return isSelected(tabText); + } + catch (NoSuchElementException countReloading) + { + // The tab's row count disappears while the selected grid reloads + return false; + } + }, "tab did not become selected in time", WebDriverWrapper.WAIT_FOR_JAVASCRIPT); getWrapper().shortWait().until(ExpectedConditions.stalenessOf(grid.getComponentElement())); grid = getSelectedGrid(); } From ada6cba3cdcc814faa58b30c381bcce20b014d65 Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Mon, 9 Nov 2026 18:47:14 -0800 Subject: [PATCH 21/37] Wait for the auth configuration error after clicking Apply --- src/org/labkey/test/pages/core/login/AuthDialogBase.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/org/labkey/test/pages/core/login/AuthDialogBase.java b/src/org/labkey/test/pages/core/login/AuthDialogBase.java index 3becb894c6..a7076f126f 100644 --- a/src/org/labkey/test/pages/core/login/AuthDialogBase.java +++ b/src/org/labkey/test/pages/core/login/AuthDialogBase.java @@ -16,11 +16,13 @@ package org.labkey.test.pages.core.login; import org.labkey.test.Locator; +import org.labkey.test.WebDriverWrapper; import org.labkey.test.components.bootstrap.ModalDialog; import org.labkey.test.components.html.Input; import org.labkey.test.components.react.ToggleButton; import org.labkey.test.params.login.AuthenticationProvider; import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; public abstract class AuthDialogBase> extends ModalDialog { @@ -80,6 +82,10 @@ public T clickApplyExpectingError() { String buttonText = _row == null ? "Finish" : "Apply"; Locators.dismissButton(buttonText).waitForElement(this, 2000).click(); + // Required-field errors show immediately; server validation errors arrive after the save request + WebDriverWrapper.waitFor(() -> Locator.tagWithClassContaining("div", "modal__tiny-error").existsIn(this) || + !Locator.byClass("modal__error-message").findOptionalElement(this).map(WebElement::getText).orElse("").isBlank(), + "No error was shown after applying the configuration.", WebDriverWrapper.WAIT_FOR_JAVASCRIPT); return getThis(); } From 5097d778f9dc6b8b8abed4478ab711223b951a8a Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Mon, 9 Nov 2026 18:47:14 -0800 Subject: [PATCH 22/37] Add an AuditLogHelper overload that waits for a new transaction in a container --- src/org/labkey/test/util/AuditLogHelper.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/org/labkey/test/util/AuditLogHelper.java b/src/org/labkey/test/util/AuditLogHelper.java index 40195c98fe..cace51875a 100644 --- a/src/org/labkey/test/util/AuditLogHelper.java +++ b/src/org/labkey/test/util/AuditLogHelper.java @@ -463,6 +463,20 @@ public Integer getLastEventId(String containerPath, AuditEvent auditEventName) } } + /** + * Perform an action and wait for it to record a new transaction audit event. + * @return RowId of the new transaction audit event + */ + public Integer doAndWaitForTransaction(Runnable action, String containerPath) + { + int prevTransactionId = Objects.requireNonNullElse(getLastTransactionId(containerPath), -1); + action.run(); + return waitFor(() -> { + Integer transactionId = getLastTransactionId(containerPath); + return transactionId != null && transactionId > prevTransactionId ? transactionId : null; + }, "No new transaction audit event was recorded", WAIT_FOR_JAVASCRIPT); + } + public Integer doAndWaitForTransaction(Runnable action, String containerPath, AuditEvent auditEventName) { int prevTransactionId; From 6f44f1e7b428a3bc5d26040aaa1fc93e00a67ec3 Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Tue, 10 Nov 2026 10:54:56 -0800 Subject: [PATCH 23/37] Wait for the default view revert to finish before closing the dialog --- src/org/labkey/test/components/ui/grids/ManageViewsDialog.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/org/labkey/test/components/ui/grids/ManageViewsDialog.java b/src/org/labkey/test/components/ui/grids/ManageViewsDialog.java index 72d1fa00c3..8299a19b11 100644 --- a/src/org/labkey/test/components/ui/grids/ManageViewsDialog.java +++ b/src/org/labkey/test/components/ui/grids/ManageViewsDialog.java @@ -201,6 +201,9 @@ public ManageViewsDialog revertDefaultView() if(tag.isDisplayed()) { elementCache().revertDefault.click(); + // Closing the dialog before the revert saves reloads the grid with the old default + WebDriverWrapper.waitFor(() -> !Locator.tagWithText("button", "Revert").withClass("clickable-text").existsIn(this), + "Default view was not reverted.", WebDriverWrapper.WAIT_FOR_JAVASCRIPT); } return this; } From 09e113a67cbf5113cf08b7d328eb5d54004c8f6f Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Tue, 10 Nov 2026 13:11:21 -0800 Subject: [PATCH 24/37] Revert "GH Issue 1793: Disable the Firefox GPU process on Windows" This reverts commit 6d16d738c; it didn't fix Firefox 153 failing to start on the Windows agents. --- src/org/labkey/test/WebDriverWrapper.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/org/labkey/test/WebDriverWrapper.java b/src/org/labkey/test/WebDriverWrapper.java index a0b22a3d75..50292995f4 100644 --- a/src/org/labkey/test/WebDriverWrapper.java +++ b/src/org/labkey/test/WebDriverWrapper.java @@ -18,7 +18,6 @@ import org.apache.commons.collections4.MultiValuedMap; import org.apache.commons.collections4.multimap.HashSetValuedHashMap; import org.apache.commons.lang3.StringUtils; -import org.apache.commons.lang3.SystemUtils; import org.apache.commons.lang3.mutable.MutableInt; import org.apache.commons.lang3.tuple.ImmutablePair; import org.apache.commons.lang3.tuple.Pair; @@ -410,11 +409,6 @@ protected Pair createNewWebDriver(@NotNull Pair Date: Tue, 10 Nov 2026 13:11:21 -0800 Subject: [PATCH 25/37] GH Issue 1793: Temporarily disable Firefox sandboxes on Windows --- src/org/labkey/test/WebDriverWrapper.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/org/labkey/test/WebDriverWrapper.java b/src/org/labkey/test/WebDriverWrapper.java index 50292995f4..580ca58703 100644 --- a/src/org/labkey/test/WebDriverWrapper.java +++ b/src/org/labkey/test/WebDriverWrapper.java @@ -18,6 +18,7 @@ import org.apache.commons.collections4.MultiValuedMap; import org.apache.commons.collections4.multimap.HashSetValuedHashMap; import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.SystemUtils; import org.apache.commons.lang3.mutable.MutableInt; import org.apache.commons.lang3.tuple.ImmutablePair; import org.apache.commons.lang3.tuple.Pair; @@ -427,6 +428,16 @@ protected Pair createNewWebDriver(@NotNull Pair Date: Tue, 10 Nov 2026 15:19:40 -0800 Subject: [PATCH 26/37] Revert "GH Issue 1793: Temporarily disable Firefox sandboxes on Windows" This reverts commit dd5f4117277ae8d9dc642fa8e758645e5fa866ed. --- src/org/labkey/test/WebDriverWrapper.java | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/org/labkey/test/WebDriverWrapper.java b/src/org/labkey/test/WebDriverWrapper.java index 580ca58703..50292995f4 100644 --- a/src/org/labkey/test/WebDriverWrapper.java +++ b/src/org/labkey/test/WebDriverWrapper.java @@ -18,7 +18,6 @@ import org.apache.commons.collections4.MultiValuedMap; import org.apache.commons.collections4.multimap.HashSetValuedHashMap; import org.apache.commons.lang3.StringUtils; -import org.apache.commons.lang3.SystemUtils; import org.apache.commons.lang3.mutable.MutableInt; import org.apache.commons.lang3.tuple.ImmutablePair; import org.apache.commons.lang3.tuple.Pair; @@ -428,16 +427,6 @@ protected Pair createNewWebDriver(@NotNull Pair Date: Tue, 10 Nov 2026 15:20:55 -0800 Subject: [PATCH 27/37] GH Issue 1793: Temporarily run Firefox headless on Windows --- src/org/labkey/test/WebDriverWrapper.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/org/labkey/test/WebDriverWrapper.java b/src/org/labkey/test/WebDriverWrapper.java index 50292995f4..d519c58b67 100644 --- a/src/org/labkey/test/WebDriverWrapper.java +++ b/src/org/labkey/test/WebDriverWrapper.java @@ -18,6 +18,7 @@ import org.apache.commons.collections4.MultiValuedMap; import org.apache.commons.collections4.multimap.HashSetValuedHashMap; import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.SystemUtils; import org.apache.commons.lang3.mutable.MutableInt; import org.apache.commons.lang3.tuple.ImmutablePair; import org.apache.commons.lang3.tuple.Pair; @@ -417,7 +418,8 @@ protected Pair createNewWebDriver(@NotNull Pair Date: Tue, 10 Nov 2026 16:07:09 -0800 Subject: [PATCH 28/37] GH Issue 1793: Type over ExtJS inputs instead of clearing them in setFormElement --- src/org/labkey/test/WebDriverWrapper.java | 24 +++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/src/org/labkey/test/WebDriverWrapper.java b/src/org/labkey/test/WebDriverWrapper.java index d519c58b67..1892ecc66a 100644 --- a/src/org/labkey/test/WebDriverWrapper.java +++ b/src/org/labkey/test/WebDriverWrapper.java @@ -3529,12 +3529,20 @@ private void setInput(WebElement input, String text) } else if (text.length() < 1000 && !text.contains("\n") && !text.contains("\t")) { - input.clear(); - if (!waitFor(()-> getFormElement(input).isEmpty(), 500)) + if (isExtFormField(input)) { - TestLogger.warn("Failed to clear input: " + input); + // clear() blurs the field, which lets an ExtJS form refill it (e.g. with a default) before the text is typed + input.sendKeys(Keys.chord(WebDriverUtils.MODIFIER_KEY, "a"), text); + } + else + { + input.clear(); + if (!waitFor(()-> getFormElement(input).isEmpty(), 500)) + { + TestLogger.warn("Failed to clear input: " + input); + } + input.sendKeys(text); } - input.sendKeys(text); if (!waitFor(()-> getFormElement(input).equals(text), 500)) { TestLogger.warn("Failed to set input: " + input); @@ -3558,6 +3566,14 @@ else if (text.length() < 1000 && !text.contains("\n") && !text.contains("\t")) } } + private static final Pattern EXT_FORM_TEXT_CLASS = Pattern.compile("\\bx4?-form-text\\b"); + + private boolean isExtFormField(WebElement input) + { + String elementClass = input.getDomAttribute("class"); + return elementClass != null && EXT_FORM_TEXT_CLASS.matcher(elementClass).find(); + } + public void actionClick(WebElement el) { new Actions(getDriver()).moveToElement(el).click().perform(); From b109a0e4ca82d0c42a8034e48dec8f167eac59f5 Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Tue, 10 Nov 2026 17:48:54 -0800 Subject: [PATCH 29/37] GH Issue 1793: Only type over Ext4 inputs in setFormElement --- src/org/labkey/test/WebDriverWrapper.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/org/labkey/test/WebDriverWrapper.java b/src/org/labkey/test/WebDriverWrapper.java index 1892ecc66a..026d43471f 100644 --- a/src/org/labkey/test/WebDriverWrapper.java +++ b/src/org/labkey/test/WebDriverWrapper.java @@ -3529,9 +3529,9 @@ private void setInput(WebElement input, String text) } else if (text.length() < 1000 && !text.contains("\n") && !text.contains("\t")) { - if (isExtFormField(input)) + if (isExt4FormField(input)) { - // clear() blurs the field, which lets an ExtJS form refill it (e.g. with a default) before the text is typed + // clear() blurs the field, which lets an Ext4 form refill it (e.g. with a default) before the text is typed input.sendKeys(Keys.chord(WebDriverUtils.MODIFIER_KEY, "a"), text); } else @@ -3566,12 +3566,13 @@ else if (text.length() < 1000 && !text.contains("\n") && !text.contains("\t")) } } - private static final Pattern EXT_FORM_TEXT_CLASS = Pattern.compile("\\bx4?-form-text\\b"); + private static final Pattern EXT4_FORM_TEXT_CLASS = Pattern.compile("\\bx4-form-text\\b"); - private boolean isExtFormField(WebElement input) + // Typing over an Ext3 field (e.g. the data region filter dialog) leaves it empty, so this is Ext4 only + private boolean isExt4FormField(WebElement input) { String elementClass = input.getDomAttribute("class"); - return elementClass != null && EXT_FORM_TEXT_CLASS.matcher(elementClass).find(); + return elementClass != null && EXT4_FORM_TEXT_CLASS.matcher(elementClass).find(); } public void actionClick(WebElement el) From d89e9cf7ba5d2639fb86e4731fd007ae61dc7a3d Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Tue, 10 Nov 2026 19:19:35 -0800 Subject: [PATCH 30/37] GH Issue 1793: Fix headless clipboard and typing over Ext4 inputs; run Firefox headless on TeamCity Windows agents Headless Firefox has its own clipboard, so paste and copy go through navigator.clipboard. Sending select-all and text in one sendKeys call held the modifier while typing. Firefox 153 can't open a window on the Windows agents, so they default to headless. --- src/org/labkey/test/TestProperties.java | 4 +- src/org/labkey/test/WebDriverWrapper.java | 62 ++++++++++++++++++----- 2 files changed, 53 insertions(+), 13 deletions(-) diff --git a/src/org/labkey/test/TestProperties.java b/src/org/labkey/test/TestProperties.java index 572df3c078..31e2f23a49 100644 --- a/src/org/labkey/test/TestProperties.java +++ b/src/org/labkey/test/TestProperties.java @@ -205,7 +205,9 @@ public static boolean isDiagnosticsExportEnabled() public static boolean isRunWebDriverHeadless() { - return getBooleanProperty("webtest.webdriver.headless", false); + // Firefox 153 dies opening its first window on the Windows agents, which run as LocalSystem without a desktop + boolean defaultValue = isTestRunningOnTeamCity() && SystemUtils.IS_OS_WINDOWS; + return getBooleanProperty("webtest.webdriver.headless", defaultValue); } public static boolean isDumpBrowserConsole() diff --git a/src/org/labkey/test/WebDriverWrapper.java b/src/org/labkey/test/WebDriverWrapper.java index 026d43471f..6158c5d7c1 100644 --- a/src/org/labkey/test/WebDriverWrapper.java +++ b/src/org/labkey/test/WebDriverWrapper.java @@ -18,7 +18,6 @@ import org.apache.commons.collections4.MultiValuedMap; import org.apache.commons.collections4.multimap.HashSetValuedHashMap; import org.apache.commons.lang3.StringUtils; -import org.apache.commons.lang3.SystemUtils; import org.apache.commons.lang3.mutable.MutableInt; import org.apache.commons.lang3.tuple.ImmutablePair; import org.apache.commons.lang3.tuple.Pair; @@ -360,6 +359,14 @@ protected Pair createNewWebDriver(@NotNull Pair createNewWebDriver(@NotNull Pair Date: Tue, 10 Nov 2026 19:43:14 -0800 Subject: [PATCH 31/37] GH Issue 1793: Use the browser clipboard in headless Chrome too; drop unneeded Firefox clipboard prefs --- src/org/labkey/test/WebDriverWrapper.java | 24 ++++++++++------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/src/org/labkey/test/WebDriverWrapper.java b/src/org/labkey/test/WebDriverWrapper.java index 6158c5d7c1..a260104a91 100644 --- a/src/org/labkey/test/WebDriverWrapper.java +++ b/src/org/labkey/test/WebDriverWrapper.java @@ -331,6 +331,11 @@ protected Pair createNewWebDriver(@NotNull Pair createNewWebDriver(@NotNull Pair Date: Wed, 11 Nov 2026 17:32:43 -0800 Subject: [PATCH 32/37] GH Issue 1793: Don't bind a delete dialog to its spinner-only placeholder --- .../labkey/test/components/bootstrap/ModalDialog.java | 9 ++++++++- .../test/components/ui/DeleteConfirmationDialog.java | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/org/labkey/test/components/bootstrap/ModalDialog.java b/src/org/labkey/test/components/bootstrap/ModalDialog.java index 07b4985acb..a45cad7a60 100644 --- a/src/org/labkey/test/components/bootstrap/ModalDialog.java +++ b/src/org/labkey/test/components/bootstrap/ModalDialog.java @@ -184,7 +184,7 @@ static public Locator.XPathLocator dismissButton(String text) public static class ModalDialogFinder extends WebDriverComponent.WebDriverComponentFinder { - private Locator _locator; + private Locator.XPathLocator _locator; public ModalDialogFinder(WebDriver driver) { @@ -210,6 +210,13 @@ public ModalDialogFinder withBodyTextContaining(String text) return this; } + /** Skip a placeholder dialog that only shows a spinner until a loaded dialog replaces it. */ + public ModalDialogFinder withoutLoadingSpinner() + { + _locator = _locator.withoutPredicate(BootstrapLocators.loadingSpinner); + return this; + } + @Override protected ModalDialog construct(WebElement el, WebDriver driver) { diff --git a/src/org/labkey/test/components/ui/DeleteConfirmationDialog.java b/src/org/labkey/test/components/ui/DeleteConfirmationDialog.java index 16ff631697..72c90b12a8 100644 --- a/src/org/labkey/test/components/ui/DeleteConfirmationDialog.java +++ b/src/org/labkey/test/components/ui/DeleteConfirmationDialog.java @@ -71,7 +71,8 @@ public DeleteConfirmationDialog(@NotNull WebDriverWrapper sourcePage, UpdatingCo protected DeleteConfirmationDialog(String partialTitle, @NotNull WebDriverWrapper sourcePage, Function confirmationSynchronizationFunction) { - this(new ModalDialog.ModalDialogFinder(sourcePage.getDriver()).withTitleIgnoreCase(partialTitle), confirmationSynchronizationFunction); + this(new ModalDialog.ModalDialogFinder(sourcePage.getDriver()).withTitleIgnoreCase(partialTitle).withoutLoadingSpinner(), + confirmationSynchronizationFunction); } protected DeleteConfirmationDialog(ModalDialogFinder finder, Function confirmationSynchronizationFunction) From 1ca3b6bd04ebd8bfa7c9706ca8cbd3eec07484c7 Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Thu, 12 Nov 2026 14:51:03 -0800 Subject: [PATCH 33/37] GH Issue 1793: Scroll react-select options only as far as needed before clicking --- .../labkey/test/components/react/ReactSelect.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/org/labkey/test/components/react/ReactSelect.java b/src/org/labkey/test/components/react/ReactSelect.java index ee6ac437a6..0be4bed230 100644 --- a/src/org/labkey/test/components/react/ReactSelect.java +++ b/src/org/labkey/test/components/react/ReactSelect.java @@ -18,6 +18,8 @@ import org.jetbrains.annotations.NotNull; import org.labkey.test.Locator; import org.labkey.test.util.TestLogger; +import org.labkey.test.util.selenium.ScrollUtils; +import org.labkey.test.util.selenium.ScrollUtils.Alignment; import org.openqa.selenium.NoSuchElementException; import org.openqa.selenium.StaleElementReferenceException; import org.openqa.selenium.WebDriver; @@ -99,7 +101,7 @@ protected void clickOption(String option) try { optionEl = elementCache().findOption(option); - getWrapper().scrollIntoView(optionEl); + scrollOptionIntoView(optionEl); } catch (NoSuchElementException nse) { @@ -135,7 +137,7 @@ protected void clickOption(String option) for (int i = 0; i < 5 && !optionEl.isDisplayed(); i++) { sleep(500); - getWrapper().scrollIntoView(optionEl); + scrollOptionIntoView(optionEl); TestLogger.debug("scroll optionEl into view, attempt " + i); } @@ -147,6 +149,12 @@ protected void clickOption(String option) new FluentWait<>(getWrapper().getDriver()).withTimeout(Duration.ofSeconds(1)).until(ExpectedConditions.stalenessOf(optionEl)); } + // Aligning a tall option to the end of a short menu can scroll its center out of the list, leaving it unclickable + private void scrollOptionIntoView(WebElement optionEl) + { + ScrollUtils.scrollIntoView(optionEl, Alignment.nearest, Alignment.nearest); + } + @Override protected ElementCache newElementCache() { From 9968075ad3fd4c92ce32191782c998ed705ee80a Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Fri, 13 Nov 2026 09:29:19 -0800 Subject: [PATCH 34/37] Revert "GH Issue 1793: Temporary geckodriver debug logging" This reverts commit cae96c53973117b2495ad6d7a5d84d6b7c268cb2. --- src/org/labkey/test/WebDriverWrapper.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/org/labkey/test/WebDriverWrapper.java b/src/org/labkey/test/WebDriverWrapper.java index a260104a91..cf43a7d048 100644 --- a/src/org/labkey/test/WebDriverWrapper.java +++ b/src/org/labkey/test/WebDriverWrapper.java @@ -411,8 +411,7 @@ protected Pair createNewWebDriver(@NotNull Pair createNewWebDriver(@NotNull Pair Date: Fri, 13 Nov 2026 09:29:27 -0800 Subject: [PATCH 35/37] Revert "Temporarily hard-code firefox version" --- src/org/labkey/test/WebDriverWrapper.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/org/labkey/test/WebDriverWrapper.java b/src/org/labkey/test/WebDriverWrapper.java index cf43a7d048..5477a8c6bc 100644 --- a/src/org/labkey/test/WebDriverWrapper.java +++ b/src/org/labkey/test/WebDriverWrapper.java @@ -406,6 +406,9 @@ protected Pair createNewWebDriver(@NotNull Pair createNewWebDriver(@NotNull Pair Date: Fri, 13 Nov 2026 12:04:07 -0800 Subject: [PATCH 36/37] GH Issue 1793: Match detail panel titles exactly so "Details" can't find the Source or Parent Details panel --- .../labkey/test/components/ui/grids/DetailDataPanel.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/org/labkey/test/components/ui/grids/DetailDataPanel.java b/src/org/labkey/test/components/ui/grids/DetailDataPanel.java index 80626cf14b..2211ad3361 100644 --- a/src/org/labkey/test/components/ui/grids/DetailDataPanel.java +++ b/src/org/labkey/test/components/ui/grids/DetailDataPanel.java @@ -240,8 +240,12 @@ protected Locator locator() if (_asTooltip) return _baseLocatorAsTooltip; else if (_title != null) + { + // Exact match, so "Details" can't find a "Source Details" or "Parent Details" panel that renders first + String title = Locator.xq(_title); return _baseLocator.withChild(Locator.byClass("panel-heading") - .withText().containing(_title)); + .withPredicate("descendant-or-self::*[normalize-space()=" + title + "] or text()[normalize-space()=" + title + "]")); + } else return _baseLocator; } From 660349ca6d78af882372890672e81c6bb6deb606 Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Mon, 16 Nov 2026 11:43:53 -0800 Subject: [PATCH 37/37] GH Issue 1793: Read the color picker swatch from background-color --- src/org/labkey/test/components/ColorPickerInput.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/labkey/test/components/ColorPickerInput.java b/src/org/labkey/test/components/ColorPickerInput.java index f034b019ac..fda81226a4 100644 --- a/src/org/labkey/test/components/ColorPickerInput.java +++ b/src/org/labkey/test/components/ColorPickerInput.java @@ -56,7 +56,7 @@ public void setColor(Color color) public Color getSelectedColor() { - return Color.fromString(elementCache().selectedColorDiv.getCssValue("background")); + return Color.fromString(elementCache().selectedColorDiv.getCssValue("background-color")); } @Override