Skip to content
Merged
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
13 changes: 11 additions & 2 deletions src/org/labkey/test/tests/AssayExportImportTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ private Integer createSimpleProjectAndAssay(String projectName, String assayName
Connection cn = createDefaultConnection();
Protocol protocol = new GetProtocolCommand("General").execute(cn, projectName).getProtocol();
protocol.setName(assayName);
protocol.setProtocolTransformScripts(List.of(new File(SAMPLE_DATA_LOCATION, PERL_SCRIPT).getAbsolutePath()));
protocol.setSaveScriptFiles(true);
protocol.setEditableResults(true);
protocol.setEditableRuns(true);
Expand Down Expand Up @@ -199,7 +198,17 @@ private Integer createSimpleProjectAndAssay(String projectName, String assayName
resultsFields.add(new FieldDefinition("resultFileField", ColumnType.File));
domains.get("Data Fields").setFields(resultsFields);

return new SaveProtocolCommand(protocol).execute(cn, projectName).getProtocol().getProtocolId();
Integer protocolId = new SaveProtocolCommand(protocol).execute(cn, projectName).getProtocol().getProtocolId();

// GitHub Issue #159: The transform script must live in the assay's "@scripts" directory, so add it through the
// designer's file upload rather than setting an absolute path on the protocol via the API.
log("Add the transform script '" + PERL_SCRIPT + "' to the assay design using the designer's file upload.");
goToProjectHome(projectName);
ReactAssayDesignerPage assayDesignerPage = ReactAssayDesignerPage.beginAt(this, projectName, protocolId, "General", getURL().toString());
assayDesignerPage.addTransformScript(new File(SAMPLE_DATA_LOCATION, PERL_SCRIPT));
assayDesignerPage.clickFinish();

return protocolId;
}

public void addNewField(String projectName, String assayName, FieldDefinition newField)
Expand Down