Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
import org.labkey.test.WebTestHelper;
import org.labkey.test.categories.External;
import org.labkey.test.categories.LabModule;
import org.labkey.test.categories.ONPRC;
import org.labkey.test.components.CustomizeView;
import org.labkey.test.components.ext4.RadioButton;
import org.labkey.test.util.APIContainerHelper;
Expand Down Expand Up @@ -77,14 +76,14 @@
* Contains a series of tests designed to test the UI in the laboratory module.
* Also contains considerable coverage of Ext4 components and the client API
*/
@Category({External.class, ONPRC.class, LabModule.class})
@Category({External.class, LabModule.class})
public class LabModulesTest extends BaseWebDriverTest implements AdvancedSqlTest
{
protected LabModuleHelper _helper = new LabModuleHelper(this);
protected APIContainerHelper _apiContainerHelper = new APIContainerHelper(this);

protected String PROJECT_NAME = "LaboratoryVerifyProject" + TRICKY_CHARACTERS_FOR_PROJECT_NAMES;
private String VIRAL_LOAD_ASSAYNAME = "Viral Load Test";
private String GENOTYPING_ASSAYNAME = "Genotyping Assay Test";

private final String DATA_SOURCE = "Source_" + replaceNonVisibleChars(getProjectName());
private final String SUBJECT_LIST = "Subject List_" + replaceNonVisibleChars(getProjectName());
Expand Down Expand Up @@ -273,10 +272,8 @@ protected List<Pair<String, String>> getAssaysToCreate()
assays.add(Pair.of("Immunophenotyping", "TruCount Test"));
assays.add(Pair.of("ICS", "ICS Test"));
assays.add(Pair.of("SSP Typing", "SSP Test"));
assays.add(Pair.of("Viral Loads", VIRAL_LOAD_ASSAYNAME));
assays.add(Pair.of("ELISPOT_Assay", "ELISPOT Test"));
assays.add(Pair.of("Hormone Assay", "Hormone Assay Test"));
assays.add(Pair.of("Genotype Assay", "Genotyping Assay Test"));
assays.add(Pair.of("Genotype Assay", GENOTYPING_ASSAYNAME));
assays.add(Pair.of("SNP Assay", "SNP Assay Test"));

return assays;
Expand Down Expand Up @@ -922,8 +919,8 @@ private void dataSourcesTest() throws Exception
assertElementNotPresent(LabModuleHelper.getNavPanelItem("Users:", IMPORT_DATA_TEXT));

//verify that the demographics source has been added
_helper.clickNavPanelItem(VIRAL_LOAD_ASSAYNAME + ":", "Browse All");
waitForText(VIRAL_LOAD_ASSAYNAME + " Results");
_helper.clickNavPanelItem(GENOTYPING_ASSAYNAME + ":", "Browse All");
waitForText(GENOTYPING_ASSAYNAME + " Results");
_customizeViewsHelper.openCustomizeViewPanel();
_customizeViewsHelper.addColumn(fieldKey + "/gender");
_customizeViewsHelper.applyCustomView();
Expand Down Expand Up @@ -1141,9 +1138,6 @@ private void siteSettingsTest()
assertElementPresent(LabModuleHelper.getNavPanelRow("Instruments:"));
assertElementPresent(LabModuleHelper.getNavPanelRow("Peptide Pools:"));

assertElementPresent(LabModuleHelper.getNavPanelRow("Diluents:"));
assertElementPresent(LabModuleHelper.getNavPanelRow("Roche E411 Tests:"));

assertElementPresent(LabModuleHelper.getNavPanelRow("Cell Populations:"));
assertElementPresent(LabModuleHelper.getNavPanelRow("Units:"));

Expand All @@ -1157,10 +1151,6 @@ private void siteSettingsTest()
assertElementPresent(LabModuleHelper.getNavPanelRow("Allowable Barcodes:"));
assertElementPresent(LabModuleHelper.getNavPanelRow("DNA Loci:"));
assertElementPresent(LabModuleHelper.getNavPanelRow("Haplotype Definitions:"));

assertElementPresent(LabModuleHelper.getNavPanelRow("ABI7500 Detectors:"));
assertElementPresent(LabModuleHelper.getNavPanelRow("Fluors:"));
assertElementPresent(LabModuleHelper.getNavPanelRow("Techniques:"));
}

private void reportsTest()
Expand All @@ -1180,7 +1170,6 @@ private void reportsTest()
assertElementPresent(Locator.linkContainingText("SSP Test: SSP Summary"));
assertElementPresent(Locator.linkContainingText("SSP Test: Results By Run"));
assertElementPresent(Locator.linkContainingText("ICS Test: Results By Run"));
assertElementPresent(Locator.linkContainingText(VIRAL_LOAD_ASSAYNAME + ": Viral Load Summary"));

assertElementPresent(Locator.linkContainingText("View All DNA Oligos"));
assertElementPresent(Locator.linkContainingText("View All Peptides"));
Expand Down Expand Up @@ -1761,12 +1750,10 @@ private void searchPanelTest()
protected List<String> getEnabledModules()
{
List<String> modules = new ArrayList<>();
modules.add("HormoneAssay");
modules.add("ELISPOT_Assay");
modules.add("FlowAssays");
modules.add("GenotypeAssays");
modules.add("SequenceAnalysis");
modules.add("Viral_Load_Assay");
return modules;
}

Expand All @@ -1793,17 +1780,17 @@ private void defaultAssayImportMethodTest()
waitAndClickAndWait(_helper.toolIcon("Settings"));
waitForText("Set Assay Defaults");
waitAndClickAndWait(Locator.linkContainingText("Set Assay Defaults"));
String defaultVal = "LC480";
_helper.waitForField(VIRAL_LOAD_ASSAYNAME);
Ext4FieldRef.getForLabel(this, VIRAL_LOAD_ASSAYNAME).setValue(defaultVal);
String defaultVal = "UC Davis STR";
_helper.waitForField(GENOTYPING_ASSAYNAME);
Ext4FieldRef.getForLabel(this, GENOTYPING_ASSAYNAME).setValue(defaultVal);
waitAndClick(Ext4Helper.Locators.ext4Button("Submit"));

waitForElement(Ext4Helper.Locators.window("Success"));
waitAndClickAndWait(Ext4Helper.Locators.ext4Button("OK"));
waitForText("Types of Data");
_helper.goToAssayResultImport(VIRAL_LOAD_ASSAYNAME);
_helper.waitForField("Source Material");
Ext4FieldRef.getForLabel(this, "Source Material").setValue("PBMC"); //ensure form will be dirty to trigger alert
_helper.goToAssayResultImport(GENOTYPING_ASSAYNAME, false);
_helper.waitForField("Purpose");
Ext4FieldRef.getForLabel(this, "Purpose").setValue("Testing"); //ensure form will be dirty to trigger alert
Boolean state = (Boolean) Ext4FieldRef.getForBoxLabel(this, defaultVal).getValue();
assertTrue("Default method not correct", state);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public void defineAssay(String provider, String label)
_test.goToProjectHome();

_test.goToManageAssays();
new UIAssayHelper(_test).createAssayWithDefaults(provider, label);
new UIAssayHelper(_test).createAssayDesignWithDefaults(provider, label);
}

public static Locator getNavPanelItem(String label, @Nullable String itemText)
Expand Down