From 31e28c6bf2ba7235417a7b280ab74a1aa4c61be9 Mon Sep 17 00:00:00 2001 From: Marty Pradere Date: Tue, 24 Jun 2025 22:54:20 -0700 Subject: [PATCH 1/2] bulk edit helpers --- .../org/labkey/test/util/ehr/EHRTestHelper.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/ehr/test/src/org/labkey/test/util/ehr/EHRTestHelper.java b/ehr/test/src/org/labkey/test/util/ehr/EHRTestHelper.java index 6d8e036a8..715031d8c 100644 --- a/ehr/test/src/org/labkey/test/util/ehr/EHRTestHelper.java +++ b/ehr/test/src/org/labkey/test/util/ehr/EHRTestHelper.java @@ -230,6 +230,15 @@ public void applyTemplate(Ext4GridRef grid, String templateName, boolean bulkEdi } } + public Locator.XPathLocator openBulkEdit(Ext4GridRef grid) + { + grid.clickTbarButton("More Actions"); + _test.waitAndClick(Locator.tag("span").withText("Bulk Edit")); + Locator.XPathLocator bulkEditWindow = Ext4Helper.Locators.window("Bulk Edit"); + _test.waitForElement(bulkEditWindow); + return bulkEditWindow; + } + public void toggleBulkEditField(String label) { Locator.XPathLocator l = Ext4Helper.Locators.window("Bulk Edit").append(Locator.tagContainingText("label", label + ":").withClass("x4-form-item-label")); @@ -237,6 +246,13 @@ public void toggleBulkEditField(String label) _test.waitForElement(l.enabled()); } + public void toggleBulkEditExactField(String label) + { + Locator.XPathLocator l = Ext4Helper.Locators.window("Bulk Edit").append(Locator.tagWithText("label", label + ":").withClass("x4-form-item-label")); + _test.shortWait().until(ExpectedConditions.numberOfElementsToBe(l, 1)).get(0).click(); + _test.waitForElement(l.enabled()); + } + public void discardForm() { WebElement dataEntryButton = getDataEntryButton("More Actions").findElement(_test.getDriver()); From 5b0aa93e7144b69f30fdaeb2a16ea1c1f2f90555 Mon Sep 17 00:00:00 2001 From: Marty Pradere Date: Wed, 25 Jun 2025 10:49:06 -0700 Subject: [PATCH 2/2] comment --- ehr/test/src/org/labkey/test/util/ehr/EHRTestHelper.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ehr/test/src/org/labkey/test/util/ehr/EHRTestHelper.java b/ehr/test/src/org/labkey/test/util/ehr/EHRTestHelper.java index 715031d8c..052d0e2f5 100644 --- a/ehr/test/src/org/labkey/test/util/ehr/EHRTestHelper.java +++ b/ehr/test/src/org/labkey/test/util/ehr/EHRTestHelper.java @@ -239,6 +239,7 @@ public Locator.XPathLocator openBulkEdit(Ext4GridRef grid) return bulkEditWindow; } + // This method toggles the bulk edit field that CONTAINS the label parameter in the label public void toggleBulkEditField(String label) { Locator.XPathLocator l = Ext4Helper.Locators.window("Bulk Edit").append(Locator.tagContainingText("label", label + ":").withClass("x4-form-item-label")); @@ -246,6 +247,7 @@ public void toggleBulkEditField(String label) _test.waitForElement(l.enabled()); } + // This method toggles the bulk edit field that has the exact label public void toggleBulkEditExactField(String label) { Locator.XPathLocator l = Ext4Helper.Locators.window("Bulk Edit").append(Locator.tagWithText("label", label + ":").withClass("x4-form-item-label"));