Skip to content

Issue 53306: Some LKS forms don't distinguish between fields properly #900

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion luminex/src/org/labkey/luminex/LuminexDataHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public class LuminexDataHandler extends AbstractExperimentDataHandler implements
public static final String QC_FLAG_SINGLE_POINT_CONTROL_ID = "SinglePointControlId"; // Column name to use in createQCFlagEnabledSQLFragment
public static final String POSITIVITY_THRESHOLD_COLUMN_NAME = "PositivityThreshold";
public static final String POSITIVITY_THRESHOLD_DISPLAY_NAME = "Positivity Threshold";
public static final String CALCULATE_POSITIVITY_COLUMN_NAME = "calculatePositivity";
public static final String CALCULATE_POSITIVITY_COLUMN_NAME = "CalculatePositivity";
public static final String NEGATIVE_CONTROL_COLUMN_NAME = "NegativeControl";
public static final String NEGATIVE_BEAD_COLUMN_NAME = "NegativeBead";
public static final String NEGATIVE_BEAD_DISPLAY_NAME = "Subtract Negative Bead";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,6 @@ public class Elements extends WebPartPanel<?>.ElementCache

public static class Locators
{
protected static final Locator sampleInfoRadio = Locator.radioButtonByNameAndValue("participantVisitResolver", "SampleInfo");
protected static final Locator sampleInfoRadio = Locator.radioButtonByNameAndValue("ParticipantVisitResolver", "SampleInfo");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import org.labkey.test.Locator;
import org.labkey.test.components.WebPartPanel;
import org.labkey.test.components.assay.AssayConstants;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;

Expand All @@ -25,7 +26,6 @@
public class RunPropertiesWebPart extends WebPartPanel
{
private static final String TITLE = "Run Properties";
public static final String ASSAY_ID_FIELD = "name";
public static final String ASSAY_DATA_FILE_LOCATION_MULTIPLE_FIELD = "__primaryFile__";

protected RunPropertiesWebPart(WebElement componentElement, WebDriver driver)
Expand Down Expand Up @@ -67,7 +67,7 @@ public void replaceFileInAssayRun(File original, File newFile)

public void setRunId(String runId)
{
getWrapper().setFormElement(Locator.inputById(ASSAY_ID_FIELD), runId);
getWrapper().setFormElement(AssayConstants.ASSAY_NAME_FIELD_LOCATOR, runId);
}

public static class RunPropertiesWebPartFinder extends WebPartFinder<RunPropertiesWebPart, RunPropertiesWebPartFinder>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
package org.labkey.test.pages.luminex;

import org.labkey.test.Locator;
import org.labkey.test.WebDriverWrapper;
import org.labkey.test.components.assay.AssayConstants;
import org.labkey.test.components.luminex.importwizard.AnalytePropertiesWebPart;
import org.labkey.test.components.luminex.importwizard.BatchPropertiesWebPart;
import org.labkey.test.components.luminex.importwizard.DefineWellRoleWebPart;
Expand All @@ -36,9 +36,6 @@
*/
public class LuminexImportWizard extends LabKeyPage<LuminexImportWizard.Elements>
{
public static final String ASSAY_ID_FIELD = "name";


Elements _elements;
public LuminexImportWizard(WebDriverWrapper driver)
{
Expand Down Expand Up @@ -129,7 +126,7 @@ public void createNewAssayRun( String runId, Consumer<LuminexImportWizard> step1
step1.accept(this);
clickNext();

setFormElement(Locator.name(ASSAY_ID_FIELD), runId);
setFormElement(AssayConstants.ASSAY_NAME_FIELD_LOCATOR, runId);
if (step2 != null)
step2.accept(this);
clickNext();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,16 @@
import org.labkey.test.Locator;
import org.labkey.test.categories.Assays;
import org.labkey.test.categories.Daily;
import org.labkey.test.components.assay.AssayConstants;
import org.labkey.test.pages.ReactAssayDesignerPage;
import org.labkey.test.util.DataRegionTable;
import org.labkey.test.util.LogMethod;

import java.io.File;
import java.util.Calendar;

import static org.junit.Assert.assertEquals;

@Category({Daily.class, Assays.class})
@BaseWebDriverTest.ClassTimeout(minutes = 7)
public final class LuminexAsyncImportTest extends LuminexTest
Expand Down Expand Up @@ -136,15 +139,15 @@ private void reimportLuminexRunPageTwo(String runId, String isotype, String conj
String testDate, File file, int i)
{
// verify that all old values from the first imported run are present
assertFormElementEquals(Locator.name("name"), runId);
assertFormElementEquals(Locator.name("isotype"), isotype);
assertFormElementEquals(Locator.name("conjugate"), conjugate);
assertFormElementEquals(Locator.name("stndCurveFitInput"), stndCurveFitInput);
assertFormElementEquals(Locator.name("unkCurveFitInput"), unkCurveFitInput);
assertFormElementEquals(Locator.name("notebookNo"), notebookNo);
assertFormElementEquals(Locator.name("assayType"), assayType);
assertFormElementEquals(Locator.name("expPerformer"), expPerformer);
assertFormElementEquals(Locator.name("testDate"), testDate);
assertEquals(runId, getFormElement(AssayConstants.ASSAY_NAME_FIELD_LOCATOR));
assertEquals(isotype, getFormElement(Locator.name("Isotype")));
assertEquals(conjugate, getFormElement(Locator.name("Conjugate")));
assertEquals(stndCurveFitInput, getFormElement(Locator.name("StndCurveFitInput")));
assertEquals(unkCurveFitInput, getFormElement(Locator.name("UnkCurveFitInput")));
assertEquals(notebookNo, getFormElement(Locator.name("NotebookNo")));
assertEquals(assayType, getFormElement(Locator.name("AssayType")));
assertEquals(expPerformer, getFormElement(Locator.name("ExpPerformer")));
assertEquals(testDate, getFormElement(Locator.name("TestDate")));
click(Locator.xpath("//a[contains(@class, 'labkey-file-add-icon-enabled')]"));
setFormElement(Locator.name("__primaryFile__"), file);
waitForText("A file with name '" + file.getName() + "' already exists");
Expand Down Expand Up @@ -181,7 +184,7 @@ private void importRunForTestLuminexConfig(File file, Calendar testDate, int i)
{
goToTestAssayHome();
clickButton("Import Data");
setFormElement(Locator.name("network"), "NETWORK" + (i + 1));
setFormElement(Locator.name("Network"), "NETWORK" + (i + 1));
clickButton("Next");

testDate.add(Calendar.DATE, 1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.labkey.test.Locators;
import org.labkey.test.categories.Assays;
import org.labkey.test.categories.Daily;
import org.labkey.test.components.assay.AssayConstants;
import org.labkey.test.util.DataRegionTable;

import java.io.File;
Expand Down Expand Up @@ -88,7 +89,7 @@ public void testCrossPlateTitration()

String runName = "Cross Plate titration";
waitForElement(Locators.panelWebpartTitle.withText("Run Properties"));
setFormElement(Locator.name("name"), runName);
setFormElement(AssayConstants.ASSAY_NAME_FIELD_LOCATOR, runName);

uploadAssayFiles(files);
clickButton("Next");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.labkey.test.WebTestHelper;
import org.labkey.test.categories.Assays;
import org.labkey.test.categories.Daily;
import org.labkey.test.components.assay.AssayConstants;
import org.labkey.test.pages.ReactAssayDesignerPage;
import org.labkey.test.params.FieldDefinition;
import org.labkey.test.util.DataRegionTable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.labkey.test.TestFileUtils;
import org.labkey.test.categories.Assays;
import org.labkey.test.categories.Daily;
import org.labkey.test.components.assay.AssayConstants;
import org.labkey.test.pages.ReactAssayDesignerPage;
import org.labkey.test.util.DataRegionTable;

Expand Down Expand Up @@ -56,9 +57,9 @@ public void testJavaTransform()

goToTestAssayHome();
clickButton("Import Data");
setFormElement(Locator.name("species"), TEST_ASSAY_LUM_SET_PROP_SPECIES);
setFormElement(Locator.name("Species"), TEST_ASSAY_LUM_SET_PROP_SPECIES);
clickButton("Next");
setFormElement(Locator.name("name"), "transformed assayId");
setFormElement(AssayConstants.ASSAY_NAME_FIELD_LOCATOR, "transformed assayId");
setFormElement(Locator.name("__primaryFile__"), TEST_ASSAY_LUM_FILE1);
clickButton("Next", 60000);
clickButton("Save and Finish");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.labkey.test.WebTestHelper;
import org.labkey.test.categories.Assays;
import org.labkey.test.categories.Daily;
import org.labkey.test.components.assay.AssayConstants;
import org.labkey.test.util.LogMethod;
import org.labkey.test.util.LoggedParam;
import org.openqa.selenium.WebElement;
Expand Down Expand Up @@ -144,9 +145,9 @@ private void reImportData(Map<String, WellRole[]> wellRoleMap)
goToTestAssayHome();
click(Locator.linkContainingText(MULTIPLE_CURVE_ASSAY_RUN_NAME));
clickButtonContainingText("Re-import run");
checkCheckbox(Locator.radioButtonByNameAndValue("participantVisitResolver", "SampleInfo"));
checkCheckbox(Locator.radioButtonByNameAndValue("ParticipantVisitResolver", "SampleInfo"));
clickButtonContainingText("Next");
setFormElement(Locator.name(ASSAY_ID_FIELD), MULTIPLE_CURVE_ASSAY_RUN_NAME);
setFormElement(AssayConstants.ASSAY_NAME_FIELD_LOCATOR, MULTIPLE_CURVE_ASSAY_RUN_NAME);
clickButtonContainingText("Next");
for(String desc : wellRoleMap.keySet())
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public void testImportAnalyteDefaults()
}

createNewAssayRun(assayName, RUN_ID_BASE + " Check Imported Defaults");
checkCheckbox(Locator.name("calculatePositivity"));
checkCheckbox(Locator.name("CalculatePositivity"));
selectPositivityFile(TEST_ASSAY_LUM_FILE13, false);

List<WebElement> analytePropertyRows = PortalHelper.Locators.webPart("Analyte Properties").findElement(getDriver())
Expand All @@ -149,7 +149,7 @@ private void testDefaultAnalyteProperties()
// for issue 20549 :upload a run that unchecks the "Calucate Positivity" and then verify the default value for re-runs and new imports

createNewAssayRun(TEST_ASSAY_LUM, RUN_ID_BASE + " No Pos Calc");
uncheckCheckbox(Locator.name("calculatePositivity"));
uncheckCheckbox(Locator.name("CalculatePositivity"));
selectPositivityFile(TEST_ASSAY_LUM_FILE12, true);
clickButton("Save and Finish");

Expand All @@ -158,7 +158,7 @@ private void testDefaultAnalyteProperties()
verifyThresholdForReImportRun(1, 98);

createNewAssayRun(TEST_ASSAY_LUM, RUN_ID_BASE + " Threshold Default Test");
checkCheckbox(Locator.name("calculatePositivity"));
checkCheckbox(Locator.name("CalculatePositivity"));
selectPositivityFile(TEST_ASSAY_LUM_FILE12, true);
verifyAnalytePosThresholdValue(_analyteNames.get(0), 98);
clickButton("Cancel");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.labkey.test.WebTestHelper;
import org.labkey.test.categories.Assays;
import org.labkey.test.categories.Daily;
import org.labkey.test.components.assay.AssayConstants;
import org.labkey.test.pages.ReactAssayDesignerPage;
import org.labkey.test.util.DataRegionTable;
import org.labkey.test.util.LabKeyExpectedConditions;
Expand Down Expand Up @@ -121,9 +122,9 @@ public void uploadRun()
clickButton("Import Data");
clickButton("Next");

setFormElement(Locator.name("name"), "r script transformed assayId");
checkCheckbox(Locator.name("subtNegativeFromAll"));
setFormElement(Locator.name("stndCurveFitInput"), "FI");
setFormElement(AssayConstants.ASSAY_NAME_FIELD_LOCATOR, "r script transformed assayId");
checkCheckbox(Locator.name("SubtNegativeFromAll"));
setFormElement(Locator.name("StndCurveFitInput"), "FI");
setFormElement(Locator.name("unkCurveFitInput"), "FI-Bkgd-Neg");
setFormElement(Locator.name("__primaryFile__"), TEST_ASSAY_LUM_FILE4);
clickButton("Next", defaultWaitForPage * 2);
Expand Down Expand Up @@ -158,13 +159,13 @@ public void testNegativeBead()
clickButton("Import Data");
clickButton("Next");
String assayRunId = "negative bead assayId";
setFormElement(Locator.name("name"), assayRunId);
uncheckCheckbox(Locator.name("subtNegativeFromAll"));
setFormElement(AssayConstants.ASSAY_NAME_FIELD_LOCATOR, assayRunId);
uncheckCheckbox(Locator.name("SubtNegativeFromAll"));
setFormElement(Locator.name("__primaryFile__"), TEST_ASSAY_LUM_FILE4);
waitForElement(Locator.id("file-upload-tbl").containing(TEST_ASSAY_LUM_FILE4.getName()));
clickButton("Next", defaultWaitForPage * 2);

// uncheck all of the titration well role types
// uncheck all the titration well role types
uncheckCheckbox(Locator.name("_titrationRole_standard_Standard1"));
uncheckCheckbox(Locator.name("_titrationRole_qccontrol_Standard1"));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ private void importRun(String filename, int runNumber) {

goToTestAssayHome();
clickButton("Import Data");
setFormElement(Locator.name("network"), "NETWORK" + runNumber);
setFormElement(Locator.name("Network"), "NETWORK" + runNumber);
clickButton("Next");

Calendar testDate = Calendar.getInstance();
Expand Down
30 changes: 16 additions & 14 deletions luminex/test/src/org/labkey/test/tests/luminex/LuminexTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import org.labkey.test.Locator;
import org.labkey.test.TestFileUtils;
import org.labkey.test.TestTimeoutException;
import org.labkey.test.components.assay.AssayConstants;
import org.labkey.test.components.html.BootstrapMenu;
import org.labkey.test.components.html.Checkbox;
import org.labkey.test.pages.ReactAssayDesignerPage;
Expand Down Expand Up @@ -69,6 +70,7 @@ public abstract class LuminexTest extends BaseWebDriverTest
protected final static String TEST_ASSAY_PRJ_LUMINEX = "LuminexTest Project";
protected final static String TEST_ASSAY_SUBFOLDER = "Subfolder";//project for luminex test


// Issue 51845:
// - Luminex assay not working well when assay name contains dot (.)
// - use DOMAIN_SPECIAL_STRING instead of DOMAIN_TRICKY_CHARACTERS since sql server is not working with unicode characters
Expand Down Expand Up @@ -102,7 +104,6 @@ public abstract class LuminexTest extends BaseWebDriverTest
public static final File RTRANSFORM_SCRIPT_FILE_LABKEY = new File(TestFileUtils.getLabKeyRoot(), "server/modules/commonAssays/luminex/resources/transformscripts/labkey_luminex_transform.R");
public static final File RTRANSFORM_SCRIPT_FILE_LAB = new File(TestFileUtils.getLabKeyRoot(), "server/modules/commonAssays/luminex/resources/transformscripts/tomaras_luminex_transform.R");

public static final String ASSAY_ID_FIELD = "name";
public static final String ASSAY_DATA_FILE_LOCATION_MULTIPLE_FIELD = "__primaryFile__";

public static final String DATA_TABLE_NAME = "Data";
Expand All @@ -120,6 +121,7 @@ public abstract class LuminexTest extends BaseWebDriverTest

public static final String isotype = "IgG ></% 1";// put back TRICKY_CHARACTERS_NO_QUOTES when issue 20061 is resolved
public static final String conjugate = "PE ></% 1";// put back TRICKY_CHARACTERS_NO_QUOTES when issue 20061 is resolved
public static final Locator.XPathLocator SPECIES_LOCATOR = Locator.name("Species");

public LuminexTest()
{
Expand Down Expand Up @@ -559,7 +561,7 @@ protected void createNewAssayRun(String assayName, String runId)
wiz.startImport();
wiz.checkParticipantVisitResolver();
clickButtonContainingText("Next");
setFormElement(Locator.name(ASSAY_ID_FIELD), runId);
setFormElement(AssayConstants.ASSAY_NAME_FIELD_LOCATOR, runId);
}

public void goToQCAnalysisPage(String assayName, String submenuText)
Expand Down Expand Up @@ -606,15 +608,15 @@ protected void importLuminexRunPageTwo(String runId, String isotype, String conj
String unkCurveFitInput, String notebookNo, String assayType, String expPerformer,
String testDate, File file, int i, boolean expectDuplicateFile)
{
setFormElement(Locator.name("name"), runId);
setFormElement(Locator.name("isotype"), isotype);
setFormElement(Locator.name("conjugate"), conjugate);
setFormElement(Locator.name("stndCurveFitInput"), stndCurveFitInput);
setFormElement(Locator.name("unkCurveFitInput"), unkCurveFitInput);
setFormElement(Locator.name("notebookNo"), notebookNo);
setFormElement(Locator.name("assayType"), assayType);
setFormElement(Locator.name("expPerformer"), expPerformer);
setFormElement(Locator.name("testDate"), testDate);
setFormElement(AssayConstants.ASSAY_NAME_FIELD_LOCATOR, runId);
setFormElement(Locator.name("Isotype"), isotype);
setFormElement(Locator.name("Conjugate"), conjugate);
setFormElement(Locator.name("StndCurveFitInput"), stndCurveFitInput);
setFormElement(Locator.name("UnkCurveFitInput"), unkCurveFitInput);
setFormElement(Locator.name("NotebookNo"), notebookNo);
setFormElement(Locator.name("AssayType"), assayType);
setFormElement(Locator.name("ExpPerformer"), expPerformer);
setFormElement(Locator.name("TestDate"), testDate);
setFormElement(Locator.name("__primaryFile__"), file);

if (expectDuplicateFile)
Expand All @@ -638,9 +640,9 @@ protected void createAndImpersonateUser(String user, String perms)
public DataRegionTable uploadPositivityFile(String assayName, @LoggedParam String assayRunId, @LoggedParam File file, String baseVisit, String foldChange, boolean isBackgroundUpload, boolean expectDuplicateFile)
{
createNewAssayRun(assayName, assayRunId);
checkCheckbox(Locator.name("calculatePositivity"));
setFormElement(Locator.name("baseVisit"), baseVisit);
setFormElement(Locator.name("positivityFoldChange"), foldChange);
checkCheckbox(Locator.name("CalculatePositivity"));
setFormElement(Locator.name("BaseVisit"), baseVisit);
setFormElement(Locator.name("PositivityFoldChange"), foldChange);
selectPositivityFile(file, expectDuplicateFile);
setAnalytePropertyValues();
finishUploadPositivityFile(assayRunId, isBackgroundUpload);
Expand Down
Loading