Skip to content
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

Delete MS2 GWT code. Switch to simple job launcher #2206

Draft
wants to merge 7 commits into
base: develop
Choose a base branch
from
Draft
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
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);
}
}