From e0d7e796508736f74de0a511c2fc15e067b7659e Mon Sep 17 00:00:00 2001 From: Trey Chadick Date: Mon, 4 Aug 2025 11:44:48 -0700 Subject: [PATCH 1/2] Wait for active report panel to prevent NPEs (#999) --- ehr/test/src/org/labkey/test/pages/ehr/ParticipantViewPage.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ehr/test/src/org/labkey/test/pages/ehr/ParticipantViewPage.java b/ehr/test/src/org/labkey/test/pages/ehr/ParticipantViewPage.java index 9b73ebaf2..7477a66de 100644 --- a/ehr/test/src/org/labkey/test/pages/ehr/ParticipantViewPage.java +++ b/ehr/test/src/org/labkey/test/pages/ehr/ParticipantViewPage.java @@ -115,7 +115,7 @@ public ParticipantViewPage clickReportTab(String reportLabel) public WebElement getActiveReportPanel() { - return activeReportPanel.findElementOrNull(getDriver()); + return activeReportPanel.waitForElement(getDriver(), 2_000); } public DataRegionTable getActiveReportDataRegion() From bc48be4142da5d1a420e51bb3fd7aadd35244247 Mon Sep 17 00:00:00 2001 From: Marty Pradere Date: Wed, 6 Aug 2025 13:10:44 -0700 Subject: [PATCH 2/2] Add container option to ehr billing ext cols (#998) * Add container field and pass this in to API call * Test helper update --- ehr/resources/views/ehrTemplates.html | 27 ++++++++++++------- .../labkey/test/util/ehr/EHRTestHelper.java | 8 ++++++ 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/ehr/resources/views/ehrTemplates.html b/ehr/resources/views/ehrTemplates.html index 85e8be151..8bc92b752 100644 --- a/ehr/resources/views/ehrTemplates.html +++ b/ehr/resources/views/ehrTemplates.html @@ -37,14 +37,18 @@ } createEHRBillingDomainHandler = function () { - var ctx = EHR.Utils.getEHRContext(); + const ctx = EHR.Utils.getEHRContext(); + const container = document.getElementById("ehrbilling_container").value; + if (!container) { + LABKEY.Utils.alert("Error", "Must enter the container path of the billing folder."); + } LABKEY.Domain.create({ module: ctx ? ctx['EHRCustomModule'] : null, domainKind: "EHR_Billing", domainGroup: "ehr_billing", importData: false, - containerPath: ctx ? ctx['EHRStudyContainer'] : null, + containerPath: container, success: function () { LABKEY.Utils.alert("Success","EHR_Billing tables updated successfully."); }, @@ -55,8 +59,8 @@ } createEHRComplianceDomainHandler = function () { - var ctx = EHR.Utils.getEHRContext(); - var container = document.getElementById("ehrcompliance_container").value; + const ctx = EHR.Utils.getEHRContext(); + const container = document.getElementById("ehrcompliance_container").value; if (!container) { LABKEY.Utils.alert("Error", "Must enter the container path of the compliance folder."); } @@ -90,16 +94,19 @@
Load EHR table definitions

+ Load EHR_Lookup table definitions

- Load EHR_Billing table definitions + + Load EHR_Billing table definitions + +

-
- Load EHR_Compliance table definitions - - -
+ Load EHR_Compliance table definitions + + +
\ No newline at end of file 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 fcf79a5ef..32ec32e8c 100644 --- a/ehr/test/src/org/labkey/test/util/ehr/EHRTestHelper.java +++ b/ehr/test/src/org/labkey/test/util/ehr/EHRTestHelper.java @@ -290,6 +290,14 @@ public void verifyAllReportTabs(ParticipantViewPage participantView) verifyReportTabs(participantView, Collections.emptyMap()); } + public WebElement fillAnInputByName(String name, String value) + { + WebElement el = Locator.name(name).findElement(_test.getDriver()); + el.click(); + el.sendKeys(value); + return el; + } + /** * Verify that the specified reports have no errors * @param participantView Should be on a participant view or animal history page with some animals selected