From b92ee901912f02d796a62b2acd45a5961282fc17 Mon Sep 17 00:00:00 2001 From: labkey-susanh Date: Wed, 24 Sep 2025 11:47:16 -0700 Subject: [PATCH 1/3] Issue 53961: Update label of MetricUnit to Display Units --- src/org/labkey/test/tests/SampleTypeTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/labkey/test/tests/SampleTypeTest.java b/src/org/labkey/test/tests/SampleTypeTest.java index a0a0f76e38..c1dd5e7dc4 100644 --- a/src/org/labkey/test/tests/SampleTypeTest.java +++ b/src/org/labkey/test/tests/SampleTypeTest.java @@ -1947,7 +1947,7 @@ public void testAmountsAndUnitsWithoutDisplayUnit() CreateSampleTypePage createPage = sampleHelper .goToCreateNewSampleType() .setName(sampleTypeName); - assertTextNotPresent("Amount Display Units"); + assertTextNotPresent("Display Units"); createPage.clickSave(); sampleHelper.goToSampleType(sampleTypeName); From 58f5c675f398b1ddba80fbf780b2341a89f82d27 Mon Sep 17 00:00:00 2001 From: labkey-susanh Date: Wed, 24 Sep 2025 17:46:20 -0700 Subject: [PATCH 2/3] Issue 53975: Update error messaging for missing amounts and units --- src/org/labkey/test/tests/SampleTypeTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/org/labkey/test/tests/SampleTypeTest.java b/src/org/labkey/test/tests/SampleTypeTest.java index c1dd5e7dc4..44b2b4ea24 100644 --- a/src/org/labkey/test/tests/SampleTypeTest.java +++ b/src/org/labkey/test/tests/SampleTypeTest.java @@ -1980,11 +1980,11 @@ public void testAmountsAndUnitsWithoutDisplayUnit() log("verify that bulk import with an amount or unit requires both fields to be filled in"); // bulk import with amount but not unit (error expected) sampleHelper.bulkImportExpectingError(List.of(Map.of("Name", "AU-BULK-ERR-1", "StoredAmount", "0")), SampleTypeHelper.IMPORT_OPTION); - assertTextPresent("When adding or updating samples, a Units value must be provided when there is a value for Amount."); + assertTextPresent("A Units value must be provided when Amounts are provided"); clickButton("Cancel"); // bulk import with unit but not amount (error expected) sampleHelper.bulkImportExpectingError(List.of(Map.of("Name", "AU-BULK-ERR-2", "Units", "mL")), SampleTypeHelper.IMPORT_OPTION); - assertTextPresent("When adding or updating samples, a Amount value must be provided when there is a value for Units."); + assertTextPresent("An Amount value must be provided Units are provided."); clickButton("Cancel"); // bulk import with both amount and unit (success expected) sampleHelper.bulkImport(List.of(Map.of("Name", "AU-BULK-SUCCESS-1", "StoredAmount", "0", "Units", "L"))); From d532b6a638b0618e2f392a5738e0c9dc306326c3 Mon Sep 17 00:00:00 2001 From: labkey-susanh Date: Thu, 25 Sep 2025 13:55:14 -0700 Subject: [PATCH 3/3] Add sample type name to incompatible units messaging --- src/org/labkey/test/tests/SampleTypeTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/org/labkey/test/tests/SampleTypeTest.java b/src/org/labkey/test/tests/SampleTypeTest.java index a5f0ce325b..f6fbd5243d 100644 --- a/src/org/labkey/test/tests/SampleTypeTest.java +++ b/src/org/labkey/test/tests/SampleTypeTest.java @@ -1885,10 +1885,10 @@ public void testAmountsAndUnitsWithDisplayUnit() log("verify error when inserting a row with incompatible units"); sampleHelper.insertRow(Map.of("Name", "AU-ERR-1", "StoredAmount", "5.0", "Units", "mg")); - assertTextPresent("Units value (mg) is not compatible with the display units (mL)."); + assertTextPresent("Units value (mg) is not compatible with the " + sampleTypeName + " display units (mL)."); clickButton("Cancel"); sampleHelper.insertRow(Map.of("Name", "AU-ERR-1", "StoredAmount", "5.0", "Units", "unit")); - assertTextPresent("Units value (unit) is not compatible with the display units (mL)."); + assertTextPresent("Units value (unit) is not compatible with the " + sampleTypeName + " display units (mL)."); clickButton("Cancel"); log("verify inserting a row with compatible units succeeds and are converted"); @@ -1901,7 +1901,7 @@ public void testAmountsAndUnitsWithDisplayUnit() log("verify updating a row with incompatible units fails"); sampleHelper.updateRow(0, Map.of("Units", "mg")); - assertTextPresent("Units value (mg) is not compatible with the display units (mL)."); + assertTextPresent("Units value (mg) is not compatible with the " + sampleTypeName + " display units (mL)."); clickButton("Cancel"); log("verify updating a row with compatible units succeeds and are converted"); @@ -1914,7 +1914,7 @@ public void testAmountsAndUnitsWithDisplayUnit() log("verify bulk import with incompatible units fails"); sampleHelper.bulkImportExpectingError(List.of(Map.of("Name", "AU-BULK-ERR-1", "StoredAmount", "0", "Units", "kg")), SampleTypeHelper.IMPORT_OPTION); - assertTextPresent("Units value (kg) is not compatible with the display units (mL)."); + assertTextPresent("Units value (kg) is not compatible with the " + sampleTypeName + " display units (mL)."); clickButton("Cancel"); log("verify bulk import with compatible units succeeds and are converted");