6868@ BaseWebDriverTest .ClassTimeout (minutes = 10 )
6969public class AssayExportImportTest extends BaseWebDriverTest
7070{
71+ public static final String INSTRUMENT_SETTING_FIELD_NAME = "instrumentSetting" ;
72+ public static final String RUN_FILE_FIELD_NAME = "runFileField" ;
73+ public static final String OPERATOR_EMAIL_FIELD_NAME = "operatorEmail" ;
74+ public static final String INSTRUMENT_FIELD_NAME = "instrument" ;
7175 private final String ASSAY_PROJECT_FOR_EXPORT_01 = "Assay_Project_For_Export_ByFilesWebPart" ;
7276 private final String ASSAY_PROJECT_FOR_IMPORT_01 = "Assay_Project_For_Import_ByFilesWebPart" ;
7377 private final String ASSAY_PROJECT_FOR_EXPORT_02 = "Assay_Project_For_Export_ByFile" ;
@@ -170,16 +174,16 @@ private Integer createSimpleProjectAndAssay(String projectName, String assayName
170174 protocol .getDomains ().forEach (domain -> domains .put (domain .getName (), domain ));
171175
172176 Domain batchDomain = domains .get ("Batch Fields" );
173- batchDomain .getFields ().add (new FieldDefinition ("operatorEmail" , ColumnType .String ));
174- batchDomain .getFields ().add (new FieldDefinition ("instrument" , ColumnType .String )
177+ batchDomain .getFields ().add (new FieldDefinition (OPERATOR_EMAIL_FIELD_NAME , ColumnType .String ));
178+ batchDomain .getFields ().add (new FieldDefinition (INSTRUMENT_FIELD_NAME , ColumnType .String )
175179 .setDescription ("The diagnostic test instrument." ));
176180
177181 Domain runDomain = domains .get ("Run Fields" );
178182 List <PropertyDescriptor > runFields = runDomain .getFields ();
179- runFields .add (new FieldDefinition ("instrumentSetting" , ColumnType .Integer )
183+ runFields .add (new FieldDefinition (INSTRUMENT_SETTING_FIELD_NAME , ColumnType .Integer )
180184 .setDescription ("The configuration setting on the instrument." ));
181185 if (hasRunFileField )
182- runFields .add (new FieldDefinition ("runFileField" , ColumnType .File )
186+ runFields .add (new FieldDefinition (RUN_FILE_FIELD_NAME , ColumnType .File )
183187 .setDescription ("File for the run." ));
184188 domains .get ("Run Fields" ).setFields (runFields );
185189
@@ -267,7 +271,7 @@ public void populateAssay(String projectName, String assayName, boolean useFiles
267271 if (fileIndex < runProperties .size ())
268272 {
269273 clickAndWait (Locator .lkButton ("Save and Import Another Run" ));
270- waitForElement (Locator .tagWithName ("input" , "instrumentSetting" ));
274+ waitForElement (Locator .tagWithName ("input" , INSTRUMENT_SETTING_FIELD_NAME ));
271275 }
272276
273277 }
@@ -276,7 +280,7 @@ public void populateAssay(String projectName, String assayName, boolean useFiles
276280 if (isElementPresent (Locator .lkButton ("Save and Import Another Run" )))
277281 {
278282 clickAndWait (Locator .lkButton ("Save and Import Another Run" ));
279- waitForElement (Locator .tagWithName ("input" , "instrumentSetting" ));
283+ waitForElement (Locator .tagWithName ("input" , INSTRUMENT_SETTING_FIELD_NAME ));
280284 }
281285 }
282286
@@ -383,14 +387,14 @@ public void validateImportingFileUsingFilesWebPart() throws Exception
383387 RUN04_FILE );
384388
385389 Map <String , String > batchProperties = new HashMap <>();
386- batchProperties .put ("operatorEmail" , OPERATOR_EMAIL_01 );
387- batchProperties .put ("instrument" , INSTRUMENT_NAME_01 );
390+ batchProperties .put (OPERATOR_EMAIL_FIELD_NAME , OPERATOR_EMAIL_01 );
391+ batchProperties .put (INSTRUMENT_FIELD_NAME , INSTRUMENT_NAME_01 );
388392
389393 List <Map <String , String >> runProperties = new ArrayList <>();
390- runProperties .add (Maps .of ("name " , RUN01_NAME , "comments " , COMMENT_BASIC_01 + RUN01_NAME , "instrumentSetting" , INSTRUMENT_SETTING_01 ));
391- runProperties .add (Maps .of ("name " , RUN02_NAME , "comments " , COMMENT_BASIC_01 + RUN02_NAME , "instrumentSetting" , INSTRUMENT_SETTING_01 ));
392- runProperties .add (Maps .of ("name " , RUN03_NAME , "comments " , COMMENT_BASIC_01 + RUN03_NAME , "instrumentSetting" , INSTRUMENT_SETTING_01 ));
393- runProperties .add (Maps .of ("name " , RUN04_NAME , "comments " , COMMENT_BASIC_01 + RUN04_NAME , "instrumentSetting" , INSTRUMENT_SETTING_01 ));
394+ runProperties .add (Maps .of ("Name " , RUN01_NAME , "Comments " , COMMENT_BASIC_01 + RUN01_NAME , INSTRUMENT_SETTING_FIELD_NAME , INSTRUMENT_SETTING_01 ));
395+ runProperties .add (Maps .of ("Name " , RUN02_NAME , "Comments " , COMMENT_BASIC_01 + RUN02_NAME , INSTRUMENT_SETTING_FIELD_NAME , INSTRUMENT_SETTING_01 ));
396+ runProperties .add (Maps .of ("Name " , RUN03_NAME , "Comments " , COMMENT_BASIC_01 + RUN03_NAME , INSTRUMENT_SETTING_FIELD_NAME , INSTRUMENT_SETTING_01 ));
397+ runProperties .add (Maps .of ("Name " , RUN04_NAME , "Comments " , COMMENT_BASIC_01 + RUN04_NAME , INSTRUMENT_SETTING_FIELD_NAME , INSTRUMENT_SETTING_01 ));
394398
395399 log ("Populate the assay '" + SIMPLE_ASSAY_FOR_EXPORT + "' by using files in the Files WebPart." );
396400 populateAssay (ASSAY_PROJECT_FOR_EXPORT_01 , SIMPLE_ASSAY_FOR_EXPORT , true , runFiles , batchProperties , runProperties , SAMPLE_TXT_FILE );
@@ -478,14 +482,14 @@ public void validateImportingFileUsingRunProperties() throws Exception
478482 RUN04_FILE );
479483
480484 Map <String , String > batchProperties = new HashMap <>();
481- batchProperties .put ("operatorEmail" , OPERATOR_EMAIL_02 );
482- batchProperties .put ("instrument" , INSTRUMENT_NAME_02 );
485+ batchProperties .put (OPERATOR_EMAIL_FIELD_NAME , OPERATOR_EMAIL_02 );
486+ batchProperties .put (INSTRUMENT_FIELD_NAME , INSTRUMENT_NAME_02 );
483487
484488 List <Map <String , String >> runProperties = new ArrayList <>();
485- runProperties .add (Maps .of ("name" , RUN01_NAME , "comments" , COMMENT_BASIC_02 + RUN01_NAME , "instrumentSetting" , INSTRUMENT_SETTING_02 ));
486- runProperties .add (Maps .of ("name" , RUN02_NAME , "comments" , COMMENT_BASIC_02 + RUN02_NAME , "instrumentSetting" , INSTRUMENT_SETTING_02 ));
487- runProperties .add (Maps .of ("name" , RUN03_NAME , "comments" , COMMENT_BASIC_02 + RUN03_NAME , "instrumentSetting" , INSTRUMENT_SETTING_02 ));
488- runProperties .add (Maps .of ("name" , RUN04_NAME , "comments" , COMMENT_BASIC_02 + RUN04_NAME , "instrumentSetting" , INSTRUMENT_SETTING_02 ));
489+ runProperties .add (Maps .of ("name" , RUN01_NAME , "comments" , COMMENT_BASIC_02 + RUN01_NAME , INSTRUMENT_SETTING_FIELD_NAME , INSTRUMENT_SETTING_02 ));
490+ runProperties .add (Maps .of ("name" , RUN02_NAME , "comments" , COMMENT_BASIC_02 + RUN02_NAME , INSTRUMENT_SETTING_FIELD_NAME , INSTRUMENT_SETTING_02 ));
491+ runProperties .add (Maps .of ("name" , RUN03_NAME , "comments" , COMMENT_BASIC_02 + RUN03_NAME , INSTRUMENT_SETTING_FIELD_NAME , INSTRUMENT_SETTING_02 ));
492+ runProperties .add (Maps .of ("name" , RUN04_NAME , "comments" , COMMENT_BASIC_02 + RUN04_NAME , INSTRUMENT_SETTING_FIELD_NAME , INSTRUMENT_SETTING_02 ));
489493
490494 log ("Populate the assay '" + SIMPLE_ASSAY_FOR_EXPORT + "' by importing the file through the 'Run Properties'." );
491495 populateAssay (ASSAY_PROJECT_FOR_EXPORT_02 , SIMPLE_ASSAY_FOR_EXPORT , false , runFiles , batchProperties , runProperties , null );
@@ -665,25 +669,25 @@ public void testExportXarToPipeline() throws Exception
665669 ImportRunCommand run1 = new ImportRunCommand (assayId , RUN01_FILE );
666670 run1 .setName (RUN01_NAME );
667671 run1 .setComment (commentPrefix + RUN01_NAME );
668- run1 .setProperties (Maps .of ("instrumentSetting" , instrumentSetting ));
672+ run1 .setProperties (Maps .of (INSTRUMENT_SETTING_FIELD_NAME , instrumentSetting ));
669673 run1 .execute (cn , exportProject );
670674
671675 ImportRunCommand run2 = new ImportRunCommand (assayId , RUN02_FILE );
672676 run2 .setName (RUN02_NAME );
673677 run2 .setComment (commentPrefix + RUN02_NAME );
674- run2 .setProperties (Maps .of ("instrumentSetting" , instrumentSetting ));
678+ run2 .setProperties (Maps .of (INSTRUMENT_SETTING_FIELD_NAME , instrumentSetting ));
675679 run2 .execute (cn , exportProject );
676680
677681 ImportRunCommand run3 = new ImportRunCommand (assayId , RUN03_FILE );
678682 run3 .setName (RUN03_NAME );
679683 run3 .setComment (commentPrefix + RUN03_NAME );
680- run3 .setProperties (Maps .of ("instrumentSetting" , instrumentSetting ));
684+ run3 .setProperties (Maps .of (INSTRUMENT_SETTING_FIELD_NAME , instrumentSetting ));
681685 run3 .execute (cn , exportProject );
682686
683687 ImportRunCommand run4 = new ImportRunCommand (assayId , RUN04_XLSX_FILE );
684688 run4 .setName (RUN04_NAME );
685689 run4 .setComment (commentPrefix + RUN04_NAME );
686- run4 .setProperties (Maps .of ("instrumentSetting" , instrumentSetting ));
690+ run4 .setProperties (Maps .of (INSTRUMENT_SETTING_FIELD_NAME , instrumentSetting ));
687691 run4 .execute (cn , exportProject );
688692
689693 List <String > runColumns = Arrays .asList ("adjustedM1" , "M2" );
0 commit comments