From 7c02d21ccc0f1028f8f35083aefd40efa905d9e3 Mon Sep 17 00:00:00 2001 From: labkey-susanh Date: Wed, 7 Oct 2026 15:22:42 -0700 Subject: [PATCH] Remove remaining test reference to Derive Samples button in LKS --- .../SampleTypeFolderExportImportTest.java | 25 +++++++------------ 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/src/org/labkey/test/tests/SampleTypeFolderExportImportTest.java b/src/org/labkey/test/tests/SampleTypeFolderExportImportTest.java index 693118a774..7cccbe2f23 100644 --- a/src/org/labkey/test/tests/SampleTypeFolderExportImportTest.java +++ b/src/org/labkey/test/tests/SampleTypeFolderExportImportTest.java @@ -51,6 +51,7 @@ import org.labkey.test.util.TestDataGenerator; import org.labkey.test.util.exp.DataClassAPIHelper; import org.labkey.test.util.exp.SampleTypeAPIHelper; +import org.labkey.test.util.query.QueryApiHelper; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.ui.ExpectedConditions; @@ -217,7 +218,7 @@ protected List> getSampleDataFromDB(String folderPath, Strin } @Test - public void testExportAndImportWithMissingAndRequiredFields() + public void testExportAndImportWithMissingAndRequiredFields() throws Exception { final String SAMPLE_TYPE_NAME = "ExportMissingValues"; @@ -309,25 +310,17 @@ public void testExportAndImportWithMissingAndRequiredFields() cv.saveCustomView(); log("Derive a sample from the given samples, this will create an experiment run which is needed for export."); - - drtSamples.checkAllOnPage(); - clickAndWait(Locator.lkButtonContainingText("Derive Sample")); - - selectOptionByText(Locator.name("targetSampleTypeId"), SAMPLE_TYPE_NAME + " in /" + PROJECT_NAME); - clickButtonContainingText("Next"); - - // TODO: Should validate that the Derive Samples action shows the various fields as expected. That is the required and missing value fields should have the correct input type. Will be fixed in 19.2. - setFormElement(Locator.tagWithName("input", "Output Sample 1_Name"), sampleNames[8]); - setFormElement(Locator.tagWithName("input", "Output Sample 1_" + REQUIRED_FIELD_NAME), "Required text for this field."); - setFormElement(Locator.tagWithName("input", "Output Sample 1_" + MISSING_FIELD_NAME), "Q"); - clickButtonContainingText("Submit"); + Map derivedSample = Map.of( + "Name", sampleNames[8], + REQUIRED_FIELD_NAME, "Required text for this field.", + MISSING_FIELD_NAME, "Q", + "MaterialInputs/" + SAMPLE_TYPE_NAME, String.join(",", Arrays.copyOf(sampleNames, 8))); + new QueryApiHelper(createDefaultConnection(), PROJECT_NAME, "samples", SAMPLE_TYPE_NAME) + .insertRows(List.of(derivedSample)); // TODO: There is a bug where derived values do not honor missing value fields (treat them as a text field). So the indicator field for this sample will be empty. Will be fixed in 19.2. expectedValuesInDB.add(Map.of("Name", sampleNames[8], REQUIRED_FIELD_NAME, "Required text for this field.", MISSING_FIELD_NAME, "Q", INDICATOR_FIELD_NAME, "")); - // Wait for the header to show up, and view this as success. - waitForElementToBeVisible(Locator.tagWithText("h3", "Sample DerivedSample01")); - goToProjectHome(); log("Export folder. Sample Types export should be selected by default.");