Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
258cd1d
Firefox 153 fixes
labkey-tchad Nov 3, 2026
8ee7ec2
Temporarily hard-code firefox version
labkey-tchad Nov 3, 2026
006d9cc
Make firefox version lock only on TeamCity
labkey-tchad Nov 4, 2026
e0d66ce
Wait for search input to stop animating
labkey-tchad Nov 4, 2026
23ca0f3
Wait for color picker
labkey-tchad Nov 4, 2026
33b8e3e
Wait for domain designer errors to update
labkey-tchad Nov 4, 2026
0b4477a
Merge remote-tracking branch 'origin/release26.11-SNAPSHOT' into 26.1…
labkey-tchad Nov 4, 2026
1f35e95
GH Issue 1793: Fix chart field selection, data views sort, and overla…
labkey-tchad Nov 5, 2026
4bc561d
Merge remote-tracking branch 'origin/release26.11-SNAPSHOT' into 26.1…
labkey-tchad Nov 5, 2026
94b3036
GH Issue 1793: Give delete confirmation dialog more time to become ready
labkey-tchad Nov 5, 2026
6423b8d
GH Issue 1793: Dismiss lingering Current Page tooltip after using the…
labkey-tchad Nov 5, 2026
c235abb
Merge remote-tracking branch 'origin/release26.11-SNAPSHOT' into 26.1…
labkey-tchad Nov 6, 2026
127f473
GH Issue 1793: Don't fail when the pager tooltip lingers
labkey-tchad Nov 6, 2026
cae96c5
GH Issue 1793: Temporary geckodriver debug logging
labkey-tchad Nov 6, 2026
6d16d73
GH Issue 1793: Disable the Firefox GPU process on Windows
labkey-tchad Nov 6, 2026
ccadea5
GH Issue 1793: Wait for template options before checking Include Subf…
labkey-tchad Nov 6, 2026
950c998
Wait for the Manage Views list to reload after deleting a view
labkey-tchad Nov 10, 2026
eb82f33
Wait for Revert to become available after making a view the default
labkey-tchad Nov 10, 2026
728c1d9
Wait for modal dialog buttons to render before dismissing
labkey-tchad Nov 10, 2026
df4ea5c
Wait for chart previews to finish redrawing after a config change
labkey-tchad Nov 10, 2026
eaa7b37
Allow delete confirmation dialogs more time to load
labkey-tchad Nov 10, 2026
c17e291
Retry the naming pattern help hover until its popover shows
labkey-tchad Nov 10, 2026
69e126d
Keep checking tab selection while the tab's row count reloads
labkey-tchad Nov 10, 2026
ada6cba
Wait for the auth configuration error after clicking Apply
labkey-tchad Nov 10, 2026
5097d77
Add an AuditLogHelper overload that waits for a new transaction in a …
labkey-tchad Nov 10, 2026
6f44f1e
Wait for the default view revert to finish before closing the dialog
labkey-tchad Nov 10, 2026
09e113a
Revert "GH Issue 1793: Disable the Firefox GPU process on Windows"
labkey-tchad Nov 10, 2026
dd5f411
GH Issue 1793: Temporarily disable Firefox sandboxes on Windows
labkey-tchad Nov 10, 2026
d299a2f
Revert "GH Issue 1793: Temporarily disable Firefox sandboxes on Windows"
labkey-tchad Nov 10, 2026
3d4d5db
GH Issue 1793: Temporarily run Firefox headless on Windows
labkey-tchad Nov 10, 2026
a93812c
GH Issue 1793: Type over ExtJS inputs instead of clearing them in set…
labkey-tchad Nov 11, 2026
911d245
Merge origin/release26.11-SNAPSHOT into 26.11_fb_firefox153Fixes
labkey-tchad Nov 11, 2026
b109a0e
GH Issue 1793: Only type over Ext4 inputs in setFormElement
labkey-tchad Nov 11, 2026
d89e9cf
GH Issue 1793: Fix headless clipboard and typing over Ext4 inputs; ru…
labkey-tchad Nov 11, 2026
f1fc748
GH Issue 1793: Use the browser clipboard in headless Chrome too; drop…
labkey-tchad Nov 11, 2026
f506fb4
GH Issue 1793: Don't bind a delete dialog to its spinner-only placeho…
labkey-tchad Nov 12, 2026
9f07c28
Merge origin/release26.11-SNAPSHOT into 26.11_fb_firefox153Fixes
labkey-tchad Nov 12, 2026
1ca3b6b
GH Issue 1793: Scroll react-select options only as far as needed befo…
labkey-tchad Nov 12, 2026
9968075
Revert "GH Issue 1793: Temporary geckodriver debug logging"
labkey-tchad Nov 13, 2026
ec28840
Revert "Temporarily hard-code firefox version"
labkey-tchad Nov 13, 2026
de009e1
GH Issue 1793: Match detail panel titles exactly so "Details" can't f…
labkey-tchad Nov 13, 2026
01fa5b3
Merge origin/release26.11-SNAPSHOT into 26.11_fb_firefox153Fixes
labkey-tchad Nov 14, 2026
660349c
GH Issue 1793: Read the color picker swatch from background-color
labkey-tchad Nov 16, 2026
2ff0056
Merge origin/release26.11-SNAPSHOT into 26.11_fb_firefox153Fixes
labkey-tchad Nov 17, 2026
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
4 changes: 3 additions & 1 deletion src/org/labkey/test/TestProperties.java
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
78 changes: 66 additions & 12 deletions src/org/labkey/test/WebDriverWrapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,11 @@ protected Pair<WebDriver, DriverService> createNewWebDriver(@NotNull Pair<WebDri
prefs.put("credentials_enable_service", false);
prefs.put("profile.password_manager_enabled", false);
prefs.put("safebrowsing.enabled", false); // Disable "This type of file can harm your computer."
if (TestProperties.isRunWebDriverHeadless())
{
// Chrome denies navigator.clipboard.readText (see getClipboardContent) without this
prefs.put("profile.content_settings.exceptions.clipboard", Map.of("*", Map.of("setting", 1)));
}
options.setExperimentalOption("prefs", prefs);
options.setExperimentalOption("detach", true); // Leaves browser window open after stopping the driver service
options.addArguments("test-type"); // Suppress '--ignore-certificate-errors' warning
Expand Down Expand Up @@ -364,6 +369,7 @@ protected Pair<WebDriver, DriverService> createNewWebDriver(@NotNull Pair<WebDri
profile.setPreference("print_printer", "Print to File");
profile.setPreference("print.print_to_filename", new File(downloadDir, "print.pdf").getAbsolutePath());

profile.setPreference("browser.chrome.guess_favicon", false); // '/favicon.ico' 404s and generates duplicate session cookies
profile.setPreference("browser.download.folderList", 2);
profile.setPreference("browser.download.downloadDir", downloadDir.getAbsolutePath());
profile.setPreference("browser.download.dir", downloadDir.getAbsolutePath());
Expand Down Expand Up @@ -530,6 +536,12 @@ public boolean isFirefox()
return BrowserType.FIREFOX.matchesDriver(getDriver());
}

// Headless browsers have their own clipboard, separate from the system clipboard
private boolean useBrowserClipboard()
{
return TestProperties.isRunWebDriverHeadless();
}

public Object executeScript(@Language("JavaScript") String script, Object... arguments)
{
return ((JavascriptExecutor) getDriver()).executeScript(script, arguments);
Expand Down Expand Up @@ -3526,12 +3538,22 @@ 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 (isExt4FormField(input))
{
TestLogger.warn("Failed to clear input: " + input);
// clear() blurs the field, which lets an Ext4 form refill it (e.g. with a default) before the text is typed
// Typing in the same sendKeys call as the chord sends it with the modifier still held
input.sendKeys(Keys.chord(WebDriverUtils.MODIFIER_KEY, "a"));
input.sendKeys(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);
Expand All @@ -3555,6 +3577,15 @@ else if (text.length() < 1000 && !text.contains("\n") && !text.contains("\t"))
}
}

private static final Pattern EXT4_FORM_TEXT_CLASS = Pattern.compile("\\bx4-form-text\\b");

// 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 && EXT4_FORM_TEXT_CLASS.matcher(elementClass).find();
}

public void actionClick(WebElement el)
{
new Actions(getDriver()).moveToElement(el).click().perform();
Expand Down Expand Up @@ -3617,19 +3648,37 @@ public void clearClipboardContent()

protected void setClipboardContent(String text, boolean isHtml)
{
Clipboard c = Toolkit.getDefaultToolkit().getSystemClipboard();
Transferable sel;

if (isHtml)
if (useBrowserClipboard())
{
sel = new HtmlFragmentSelection(text);
if (isHtml)
{
executeScript("""
return navigator.clipboard.write([new ClipboardItem({
'text/html': new Blob([arguments[0]], {type: 'text/html'}),
'text/plain': new Blob([arguments[0]], {type: 'text/plain'})
})]);""", text);
}
else
{
executeScript("return navigator.clipboard.writeText(arguments[0]);", text);
}
}
else
{
sel = new StringSelection(text);
}
Clipboard c = Toolkit.getDefaultToolkit().getSystemClipboard();
Transferable sel;

if (isHtml)
{
sel = new HtmlFragmentSelection(text);
}
else
{
sel = new StringSelection(text);
}

c.setContents(sel, null);
c.setContents(sel, null);
}
}

protected void setClipboardContent(String text)
Expand All @@ -3639,6 +3688,11 @@ protected void setClipboardContent(String text)

public String getClipboardContent() throws IOException, UnsupportedFlavorException
{
if (useBrowserClipboard())
{
return (String) executeScript("return navigator.clipboard.readText();");
}

Transferable t = Toolkit.getDefaultToolkit().getSystemClipboard().getContents(null);

if (t != null)
Expand Down
13 changes: 7 additions & 6 deletions src/org/labkey/test/components/ChartTypeDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<WebElement> 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;
}

Expand Down
39 changes: 24 additions & 15 deletions src/org/labkey/test/components/ColorPickerInput.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<Component<?>.ElementCache>
public class ColorPickerInput extends WebDriverComponent<ColorPickerInput.ElementCache>
{
private final WebDriver _driver;
final WebElement _componentElement;
Expand All @@ -47,20 +45,31 @@ protected WebDriver getDriver()

public void setHexValue(String hexValue)
{
List<WebElement> 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-color"));
}

@Override
protected ElementCache newElementCache()
{
return new ElementCache();
}

public String getHexValue()
protected class ElementCache extends Component<ElementCache>.ElementCache
{
List<WebElement> 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<ColorPickerInput, ColorPickerInput.ColorPickerInputFinder>
Expand Down
15 changes: 13 additions & 2 deletions src/org/labkey/test/components/bootstrap/ModalDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -180,7 +184,7 @@ static public Locator.XPathLocator dismissButton(String text)

public static class ModalDialogFinder extends WebDriverComponent.WebDriverComponentFinder<ModalDialog, ModalDialogFinder>
{
private Locator _locator;
private Locator.XPathLocator _locator;

public ModalDialogFinder(WebDriver driver)
{
Expand All @@ -206,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)
{
Expand Down
23 changes: 22 additions & 1 deletion src/org/labkey/test/components/domain/BaseDomainDesigner.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -89,8 +91,27 @@ public Object clickSave()

public List<String> clickSaveExpectingErrors()
{
List<String> 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<String> 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<String> getErrors()
{
return getWrapper().getTexts(BootstrapLocators.errorBanner.findElements(getDriver())).stream()
.map(String::trim)
.collect(Collectors.toList());
}
Expand Down
7 changes: 5 additions & 2 deletions src/org/labkey/test/components/html/SiteNavBar.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
package org.labkey.test.components.html;

import org.apache.commons.lang3.StringUtils;
import org.labkey.test.Locator;
import org.labkey.test.WebDriverWrapper;
import org.labkey.test.components.Component;
Expand All @@ -29,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;
Expand Down Expand Up @@ -172,8 +174,8 @@ public SearchResultsPage search(String searchTerm)

public boolean isSearchBarExpanded()
{
String searchBarContainerClass = elementCache().searchContainer.getAttribute("class");
return searchBarContainerClass.contains("active");
String searchBarContainerClass = StringUtils.trimToEmpty(elementCache().searchContainer.getAttribute("class"));
return searchBarContainerClass.contains("active") && elementCache().searchInput.isEnabled();
}

/* toggles the search form open and returns the search input element */
Expand All @@ -183,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;
}
Expand Down
10 changes: 10 additions & 0 deletions src/org/labkey/test/components/react/QueryChartDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -334,12 +334,21 @@ public List<String> 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)
Expand Down Expand Up @@ -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");

Expand Down
Loading
Loading