@@ -99,14 +99,18 @@ public void testExportImportSimpleDataClass() throws Exception
9999 _containerHelper .createSubfolder (getProjectName (), subfolder );
100100
101101 DataClassDefinition testType = new DataClassDefinition (testDataClass ).setFields (DataClassAPIHelper .dataClassTestFields ());
102+ String intColumnName = testType .getFieldByNamePart ("intColumn" ).getName ();
103+ String decimalColumnName = testType .getFieldByNamePart ("decimalColumn" ).getName ();
104+ String stringColumnName = testType .getFieldByNamePart ("stringColumn" ).getName ();
105+ String attachmentColumnName = testType .getFieldByNamePart ("attachmentColumn" ).getName ();
102106
103107 TestDataGenerator testDgen = DataClassAPIHelper .createEmptyDataClass (subfolderPath , testType );
104108
105- testDgen .addCustomRow (Map .of ("Name" , "class1" , "intColumn" , 7771 , "decimalColumn" , 1.1 , "stringColumn" , "one" ));
106- testDgen .addCustomRow (Map .of ("Name" , "class2" , "intColumn" , 7772 , "decimalColumn" , 2.2 , "stringColumn" , "two" ));
107- testDgen .addCustomRow (Map .of ("Name" , "class3" , "intColumn" , 7773 , "decimalColumn" , 3.3 , "stringColumn" , "three" ));
108- testDgen .addCustomRow (Map .of ("Name" , "class4" , "intColumn" , 7774 , "decimalColumn" , 4.4 , "stringColumn" , "four" ));
109- testDgen .addCustomRow (Map .of ("Name" , "class5" , "intColumn" , 7775 , "decimalColumn" , 5.5 , "stringColumn" , "five" ));
109+ testDgen .addCustomRow (Map .of ("Name" , "class1" , intColumnName , 7771 , decimalColumnName , 1.1 , stringColumnName , "one" ));
110+ testDgen .addCustomRow (Map .of ("Name" , "class2" , intColumnName , 7772 , decimalColumnName , 2.2 , stringColumnName , "two" ));
111+ testDgen .addCustomRow (Map .of ("Name" , "class3" , intColumnName , 7773 , decimalColumnName , 3.3 , stringColumnName , "three" ));
112+ testDgen .addCustomRow (Map .of ("Name" , "class4" , intColumnName , 7774 , decimalColumnName , 4.4 , stringColumnName , "four" ));
113+ testDgen .addCustomRow (Map .of ("Name" , "class5" , intColumnName , 7775 , decimalColumnName , 5.5 , stringColumnName , "five" ));
110114 testDgen .insertRows ();
111115
112116 PortalHelper portalHelper = new PortalHelper (this );
@@ -125,7 +129,7 @@ public void testExportImportSimpleDataClass() throws Exception
125129 // issue https://www.labkey.org/home/Developer/issues/issues-details.view?issueId=42191 tracks this
126130 // until it is fixed we will have to add attachments via the UI, like this
127131 sourceTable .clickEditRow (i );
128- setFormElement (Locator .input ("quf_attachmentColumn" ), _attachments .get (i ));
132+ setFormElement (Locator .input ("quf_" + attachmentColumnName ), _attachments .get (i ));
129133 clickButton ("Submit" );
130134 }
131135 List <Map <String , String >> sourceRowData = sourceTable .getTableData ();
0 commit comments