diff --git a/ms2/test/src/org/labkey/test/ms2/QuantitationTest.java b/ms2/test/src/org/labkey/test/ms2/QuantitationTest.java index 0f8ff8157..3aad4168c 100644 --- a/ms2/test/src/org/labkey/test/ms2/QuantitationTest.java +++ b/ms2/test/src/org/labkey/test/ms2/QuantitationTest.java @@ -20,11 +20,14 @@ import org.labkey.test.BaseWebDriverTest; import org.labkey.test.Locator; import org.labkey.test.categories.Daily; +import org.labkey.test.categories.MS2; +import org.labkey.test.categories.XTandem; import org.labkey.test.components.ui.lineage.LineageGraph; +import org.labkey.test.util.PipelineAnalysisHelper; import java.io.File; -@Category({Daily.class}) +@Category({Daily.class, MS2.class, XTandem.class}) @BaseWebDriverTest.ClassTimeout(minutes = 4) public class QuantitationTest extends AbstractXTandemTest { @@ -34,6 +37,8 @@ public class QuantitationTest extends AbstractXTandemTest " \n" + "\n" + " " + LIBRA_PROTOCOL_NAME + " \n" + + " Bovine_mini1.fasta\n" + + " [KR]|{P}\n" + " Search with Libra quantitation \n" + " 0 \n" + " 0 \n" + @@ -55,20 +60,15 @@ public void testSteps() setupEngine(); - waitForElement(Locator.xpath("//select[@name='sequenceDB']/option[.='" + DATABASE1 + "']" ), WAIT_FOR_JAVASCRIPT); log("Set analysis parameters."); - setFormElement(Locator.name("protocolName"), LIBRA_PROTOCOL_NAME); - setFormElement(Locator.name("protocolDescription"), "Search with Libra quantitation"); - selectOptionByText(Locator.name("sequenceDB"), DATABASE1); - setFormElement(Locator.name("configureXml"), ""); - waitAndClick(Locator.xpath("//a[@class='labkey-button']/span[text() = 'OK']")); - setFormElement(Locator.name("configureXml"), LIBRA_INPUT_XML); - clickButton("Search"); + PipelineAnalysisHelper helper = new PipelineAnalysisHelper(this); + helper.waitForProtocolSelect(); + helper.setProtocol(LIBRA_PROTOCOL_NAME, LIBRA_INPUT_XML); + helper.setDescription("Search with Libra quantitation"); + clickButton("Analyze"); + log("View the analysis log."); - // Search is submitted as AJAX, and upon success the browser is redirected to a new page. Wait for it to load - waitForElement(Locator.linkWithText("Data Pipeline"), WAIT_FOR_JAVASCRIPT); - sleep(5000); // without this sleep, some machines try to redirect back to the begin.view page after the Data Pipeline link is clicked - clickAndWait(Locator.linkWithText("Data Pipeline")); + goToModule("Pipeline"); String runDescription = SAMPLE_BASE_NAME + " (" + LIBRA_PROTOCOL_NAME + ")"; waitForPipelineJobsToComplete(1, runDescription, false); diff --git a/ms2/test/src/org/labkey/test/tests/ms2/XTandemTest.java b/ms2/test/src/org/labkey/test/tests/ms2/XTandemTest.java index b760e3b6d..533f342ff 100644 --- a/ms2/test/src/org/labkey/test/tests/ms2/XTandemTest.java +++ b/ms2/test/src/org/labkey/test/tests/ms2/XTandemTest.java @@ -32,6 +32,7 @@ import java.io.File; +import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; @@ -48,7 +49,6 @@ public class XTandemTest extends AbstractXTandemTest protected static final String SEARCH_FIND_FASTA3 = "search target ribosomal protein S16 (BS17)"; protected static final String PROTOCOL = "X!Tandem analysis"; protected static final String PEPTIDE_CROSSTAB_RADIO_PROBABILITY_ID = "peptideProphetRadioButton"; - protected static final String PEPTIDE_CROSSTAB_RADIO_PROBABILITY_VALUE = "probability"; protected static final String PEPTIDE_CROSSTAB__PROBABILITY_TEXTBOX_NAME = "peptideProphetProbability"; protected static final String PEPTIDE_CROSSTAB_RADIO_NAME = "peptideFilterType"; protected static final String PEPTIDE_CROSSTAB_RADIO_VALUE_NONE = "none"; @@ -59,7 +59,7 @@ public void testSteps() log("Verifying that pipeline files were cleaned up properly"); File test2 = new File(PIPELINE_PATH + "/bov_sample/" + SEARCH_TYPE + "/test2"); if (test2.exists()) - fail("Pipeline files were not cleaned up; test2("+test2.toString()+") directory still exists"); + fail("Pipeline files were not cleaned up; test2("+ test2 +") directory still exists"); basicMS2Check(); } @@ -157,7 +157,7 @@ private void verifyComparePeptides() setFormElement(Locator.name("minimumProbability"), ""); clickButton("Search"); clickAndWait(Locator.id("expandCollapse-ProteinSearchProteinMatches"), 0); - assertTrue(!(isTextPresent(SEARCH_FIND_FASTA1) || isTextPresent(SEARCH_FIND_ALT_FASTA1))); + assertFalse(isTextPresent(SEARCH_FIND_FASTA1) || isTextPresent(SEARCH_FIND_ALT_FASTA1)); assertTextNotPresent(SEARCH_FIND_FASTA1); assertTextPresent("No data to show");