Skip to content

Commit

Permalink
Delete MS2 GWT code. Switch to simple job launcher (#2206)
Browse files Browse the repository at this point in the history
  • Loading branch information
labkey-jeckels authored Feb 14, 2025
1 parent cffd149 commit 532008f
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 20 deletions.
31 changes: 13 additions & 18 deletions src/org/labkey/test/pipeline/AbstractPipelineTestParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
import org.labkey.test.pages.pipeline.PipelineStatusDetailsPage;
import org.labkey.test.util.ExperimentRunTable;
import org.labkey.test.util.PasswordUtil;
import org.openqa.selenium.NoSuchElementException;
import org.openqa.selenium.WebElement;
import org.labkey.test.util.PipelineAnalysisHelper;

import java.io.File;
import java.util.ArrayList;
Expand All @@ -39,11 +38,11 @@
abstract public class AbstractPipelineTestParams implements PipelineTestParams
{
protected PipelineWebTestBase _test;
private String _dataPath;
private String _protocolType;
private final String _dataPath;
private final String _protocolType;
private String _parametersFile;
private String _protocolName;
private String[] _sampleNames;
private final String _protocolName;
private final String[] _sampleNames;
private String[] _inputExtensions = new String[0];
private String[] _outputExtensions = new String[0];
private String[] _experimentLinks;
Expand Down Expand Up @@ -157,7 +156,7 @@ public String[] getExperimentLinks()
ArrayList<String> listLinks = new ArrayList<>();
for (String name : _sampleNames)
listLinks.add(dataDirName + '/' + name + " (" + _protocolName + ")");
_experimentLinks = listLinks.toArray(new String[listLinks.size()]);
_experimentLinks = listLinks.toArray(new String[0]);
}
}
return _experimentLinks;
Expand Down Expand Up @@ -234,7 +233,7 @@ public void verifyClean(File rootDir)
{
File analysisDir = new File(rootDir, getDataPath() + File.separatorChar + getProtocolType());
if (analysisDir.exists())
fail("Pipeline files were not cleaned up; "+ analysisDir.toString() + " directory still exists");
fail("Pipeline files were not cleaned up; "+ analysisDir + " directory still exists");
}

@Override
Expand All @@ -252,18 +251,14 @@ public void startProcessing()

clickActionButton();

int wait = BaseWebDriverTest.WAIT_FOR_JAVASCRIPT;
_test.log("Choose existing protocol " + getProtocolName());
_test.waitForElement(Locator.xpath("//select[@name='protocol']/option[.='" + getProtocolName() + "']" ), wait*12); // seems very long
_test.selectOptionByText(Locator.name("protocol"), getProtocolName());
WebDriverWrapper.sleep(wait);

PipelineAnalysisHelper helper = new PipelineAnalysisHelper(_test);
helper.waitForProtocolSelect();
helper.setProtocol(getProtocolName(), null);
_test.log("Start data processing");
clickSubmitButton();
WebDriverWrapper.sleep(wait);
}

protected abstract void clickSubmitButton();
helper.analyzeOrRetry(true);
WebDriverWrapper.sleep(BaseWebDriverTest.WAIT_FOR_JAVASCRIPT);
}

@Override
public void remove()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ public class PipelineProtocolArchiveTest extends BaseWebDriverTest
public static final String WEB_PART_NAME_PIPELINE_PROTOCOLS = "Pipeline Protocols";
public static final String PROTOCOL_NAME_B_R = "brainRadio";
public static final String PROTOCOL_NAME_A_M = "toBeArchived";
public static final String PROTOCOL_NAME_NEW_PROTOCOL = "<New Protocol>";
public static final String COLUMN_NAME = "name";
public static final String COLUMN_PIPELINE = "pipeline";
public static final String COLUMN_ARCHIVED = "Archived";
Expand Down Expand Up @@ -120,7 +119,7 @@ public void testArchiveProtocol() throws Exception
assertEquals("Wrong archived indication", "",protocol2_Archived);

List<String> expectedOptions = new ArrayList<>(Arrays.asList(
PROTOCOL_NAME_NEW_PROTOCOL,
PipelineAnalysisHelper.PROTOCOL_NAME_NEW_PROTOCOL,
PROTOCOL_NAME_B_R,
PROTOCOL_NAME_A_M));

Expand Down
7 changes: 7 additions & 0 deletions src/org/labkey/test/util/PipelineAnalysisHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ public class PipelineAnalysisHelper

private static int expectedJobCount = 1;

public static final String PROTOCOL_NAME_NEW_PROTOCOL = "<New Protocol>";

public PipelineAnalysisHelper(BaseWebDriverTest test)
{
_test = test;
Expand Down Expand Up @@ -276,4 +278,9 @@ private Map<String, String> loadParameterMapFromXmlString(String xml)
throw new RuntimeException("Exception parsing xml string " + xml, e);
}
}

public void setDescription(String description)
{
_test.setFormElement(Locator.name("protocolDescription"), description);
}
}

0 comments on commit 532008f

Please sign in to comment.