4141import org .labkey .test .util .EscapeUtil ;
4242import org .labkey .test .util .LogMethod ;
4343import org .labkey .test .util .LoggedParam ;
44+ import org .labkey .test .util .RReportHelper ;
4445import org .labkey .test .util .TestDataGenerator ;
4546import org .labkey .test .util .core .webdav .WebDavUploadHelper ;
4647import org .openqa .selenium .WebElement ;
@@ -72,11 +73,13 @@ public class GpatAssayTest extends BaseWebDriverTest
7273 private static final String ASSAY_NAME_FNA = "FASTA Assay" ;
7374 private static final String ASSAY_NAME_FNA_MULTIPLE = "FASTA Assay - Multiple file upload" ;
7475 private static final String ASSAY_NAME_FNA_MULTIPLE_SINGLE_INPUT = "FASTA Assay - Multiple file single input upload" ;
76+ private static final File RTRANSFORM_SCRIPT_FILE_NOOP = TestFileUtils .getSampleData ("qc/noopTransform.R" );
7577
7678 @ BeforeClass
7779 public static void doSetup ()
7880 {
7981 GpatAssayTest init = getCurrentTest ();
82+ new RReportHelper (init ).ensureRConfig ();
8083 init ._containerHelper .createProject (init .getProjectName (), "Assay" );
8184 init .goToProjectHome ();
8285 }
@@ -256,6 +259,14 @@ private void importFastaGpatAssay(File fnaFile, String assayName)
256259 clickButton ("Save and Finish" , defaultWaitForPage );
257260 }
258261
262+ // GitHub Issue #875: Optionally add transform scripts in GPAT assay design to test code path with and without transform script
263+ private void randomlyAddTransformScript (ReactAssayDesignerPage assayDesignerPage )
264+ {
265+ boolean shouldAddTransformScript = TestDataGenerator .randomBoolean ("whether to add transform script in assay design" );
266+ if (shouldAddTransformScript )
267+ assayDesignerPage .addTransformScript (RTRANSFORM_SCRIPT_FILE_NOOP );
268+ }
269+
259270 @ LogMethod
260271 private ReactAssayDesignerPage startCreateGpatAssay (File dataFile , @ LoggedParam String assayName )
261272 {
@@ -265,9 +276,9 @@ private ReactAssayDesignerPage startCreateGpatAssay(File dataFile, @LoggedParam
265276 _fileBrowserHelper .importFile (dataFile .getName (), "Create New Standard Assay Design" );
266277
267278 ReactAssayDesignerPage assayDesignerPage = new ReactAssayDesignerPage (getDriver ());
268-
269279 if (assayName != null )
270280 assayDesignerPage .setName (assayName );
281+ randomlyAddTransformScript (assayDesignerPage );
271282 return assayDesignerPage ;
272283 }
273284
0 commit comments