From a7afc01fed323e952ea52a2cc69d47f5f42e7c9e Mon Sep 17 00:00:00 2001 From: labkey-jeckels Date: Sat, 15 Feb 2025 11:48:05 -0800 Subject: [PATCH 1/3] Test fixes related to MS2 GWT deletion work --- .../org/labkey/test/ms2/QuantitationTest.java | 21 ++++++++++++------- .../labkey/test/tests/ms2/XTandemTest.java | 6 +++--- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/ms2/test/src/org/labkey/test/ms2/QuantitationTest.java b/ms2/test/src/org/labkey/test/ms2/QuantitationTest.java index 0f8ff81577..e3c4295bd4 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,14 +60,14 @@ 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); + PipelineAnalysisHelper helper = new PipelineAnalysisHelper(this); + helper.waitForProtocolSelect(); + helper.setProtocol(LIBRA_PROTOCOL_NAME, LIBRA_INPUT_XML); + helper.setDescription("Search with Libra quantitation"); + clickButton("Analyze"); + clickButton("Search"); 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 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 b760e3b6d6..533f342ffc 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"); From b7dc625563019b7ad74baa5ed0dc3e6267b3e0e4 Mon Sep 17 00:00:00 2001 From: labkey-jeckels Date: Sat, 15 Feb 2025 13:34:08 -0800 Subject: [PATCH 2/3] Different redirect location --- ms2/test/src/org/labkey/test/ms2/QuantitationTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ms2/test/src/org/labkey/test/ms2/QuantitationTest.java b/ms2/test/src/org/labkey/test/ms2/QuantitationTest.java index e3c4295bd4..5ee15bc7aa 100644 --- a/ms2/test/src/org/labkey/test/ms2/QuantitationTest.java +++ b/ms2/test/src/org/labkey/test/ms2/QuantitationTest.java @@ -70,10 +70,10 @@ public void testSteps() clickButton("Search"); log("View the analysis log."); + goToModule("Pipeline"); // 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")); + waitForText(WAIT_FOR_JAVASCRIPT, "Protein Group Results"); + goToModule("Pipeline"); String runDescription = SAMPLE_BASE_NAME + " (" + LIBRA_PROTOCOL_NAME + ")"; waitForPipelineJobsToComplete(1, runDescription, false); From 43149653736d5ddd2c89e4cf1ac1bf9e460d18fc Mon Sep 17 00:00:00 2001 From: labkey-jeckels Date: Sat, 15 Feb 2025 13:36:06 -0800 Subject: [PATCH 3/3] Different redirect location --- ms2/test/src/org/labkey/test/ms2/QuantitationTest.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ms2/test/src/org/labkey/test/ms2/QuantitationTest.java b/ms2/test/src/org/labkey/test/ms2/QuantitationTest.java index 5ee15bc7aa..3aad4168c5 100644 --- a/ms2/test/src/org/labkey/test/ms2/QuantitationTest.java +++ b/ms2/test/src/org/labkey/test/ms2/QuantitationTest.java @@ -60,7 +60,6 @@ public void testSteps() setupEngine(); - log("Set analysis parameters."); PipelineAnalysisHelper helper = new PipelineAnalysisHelper(this); helper.waitForProtocolSelect(); @@ -68,12 +67,8 @@ public void testSteps() helper.setDescription("Search with Libra quantitation"); clickButton("Analyze"); - clickButton("Search"); log("View the analysis log."); goToModule("Pipeline"); - // Search is submitted as AJAX, and upon success the browser is redirected to a new page. Wait for it to load - waitForText(WAIT_FOR_JAVASCRIPT, "Protein Group Results"); - goToModule("Pipeline"); String runDescription = SAMPLE_BASE_NAME + " (" + LIBRA_PROTOCOL_NAME + ")"; waitForPipelineJobsToComplete(1, runDescription, false);