From 2ea7928e42e0103247edcd0ebdda0109cb10bd6f Mon Sep 17 00:00:00 2001 From: ChrisJoosse Date: Wed, 6 Aug 2025 13:27:04 -0700 Subject: [PATCH 1/2] Add withTextIgnoreCase, use it to verify file root message --- src/org/labkey/test/BaseWebDriverTest.java | 2 +- src/org/labkey/test/Locator.java | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/org/labkey/test/BaseWebDriverTest.java b/src/org/labkey/test/BaseWebDriverTest.java index 57b530e61b..be9413baec 100644 --- a/src/org/labkey/test/BaseWebDriverTest.java +++ b/src/org/labkey/test/BaseWebDriverTest.java @@ -1902,7 +1902,7 @@ public void setPipelineRoot(String rootPath, boolean inherit) { _setPipelineRoot(rootPath, inherit); - waitForElement(Locators.labkeyMessage.withText("The pipeline root was set to '" + Paths.get(rootPath).normalize() + "'")); + waitForElement(Locators.labkeyMessage.withTextIgnoreCase("The pipeline root was set to '" + Paths.get(rootPath).normalize() + "'")); getArtifactCollector().addArtifactLocation(new File(rootPath)); diff --git a/src/org/labkey/test/Locator.java b/src/org/labkey/test/Locator.java index 8bcf8b532a..bdc2d6992d 100644 --- a/src/org/labkey/test/Locator.java +++ b/src/org/labkey/test/Locator.java @@ -1247,6 +1247,11 @@ public XPathLocator withText(String text) return this.withPredicate("normalize-space()="+xq(ns(text))); } + public XPathLocator withTextIgnoreCase(String text) + { + return this.withPredicate("contains(" + toLowerCase("normalize-space()", text) + ", "+xq(ns(text.toLowerCase()))+")"); + } + public XPathLocator withText() { return this.withPredicate("string-length() > 0"); From 9dedcbd6731db16c38c1d581c559c22bf258c4c6 Mon Sep 17 00:00:00 2001 From: ChrisJoosse Date: Thu, 7 Aug 2025 20:34:00 -0700 Subject: [PATCH 2/2] the right predicate this time --- src/org/labkey/test/Locator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/labkey/test/Locator.java b/src/org/labkey/test/Locator.java index bdc2d6992d..8acc80db17 100644 --- a/src/org/labkey/test/Locator.java +++ b/src/org/labkey/test/Locator.java @@ -1249,7 +1249,7 @@ public XPathLocator withText(String text) public XPathLocator withTextIgnoreCase(String text) { - return this.withPredicate("contains(" + toLowerCase("normalize-space()", text) + ", "+xq(ns(text.toLowerCase()))+")"); + return this.withPredicate(toLowerCase("normalize-space()", text) + "= "+xq(ns(text.toLowerCase()))); } public XPathLocator withText()