4848import org .labkey .test .params .FieldDefinition ;
4949import org .labkey .test .params .FieldDefinition .ColumnType ;
5050import org .labkey .test .params .FieldDefinition .LookupInfo ;
51+ import org .labkey .test .params .FieldInfo ;
5152import org .labkey .test .params .experiment .SampleTypeDefinition ;
5253import org .labkey .test .util .DataRegionExportHelper ;
5354import org .labkey .test .util .DataRegionTable ;
@@ -249,10 +250,13 @@ public void testCustomProperties()
249250 final String sampleTypeName = "SampleTypeCustomProps" + DOMAIN_TRICKY_CHARACTERS ;
250251 FieldInfo stringCol1 = new FieldInfo (TestDataGenerator .randomFieldName ("StringColPlain" , "\" " ), ColumnType .String );
251252 FieldInfo stringCol2 = new FieldInfo (TestDataGenerator .randomFieldName ("StringCol%" ), ColumnType .String );
253+ // Used to make sure the details page shows properties with null values
254+ FieldInfo stringCol3 = new FieldInfo (TestDataGenerator .randomFieldName ("StringColNull" ), ColumnType .String );
252255 FieldInfo calcCol = new FieldInfo (TestDataGenerator .randomFieldName ("CalcCol" ), ColumnType .Calculation );
253256 final List <FieldDefinition > fields = List .of (
254257 stringCol1 .getFieldDefinition (),
255258 stringCol2 .getFieldDefinition (),
259+ stringCol3 .getFieldDefinition (),
256260 calcCol .getFieldDefinition ().setValueExpression ("\" " + stringCol1 .getName () + "\" || 'Concat'" )
257261 );
258262
@@ -273,9 +277,10 @@ public void testCustomProperties()
273277 var dataRegion = DataRegionTable .DataRegion (getDriver ()).withName ("Material" ).waitFor ();
274278 checker ().verifyEquals ("Row data does not contain expected custom properties" , "PlainValue" , dataRegion .getDataAsText (0 , stringCol1 .getLabel ()));
275279 checker ().verifyEquals ("Row data does not contain expected custom properties" , "PercentValue" , dataRegion .getDataAsText (0 , stringCol2 .getLabel ()));
280+ checker ().verifyEquals ("Row data does not contain expected custom properties" , " " , dataRegion .getDataAsText (0 , stringCol3 .getLabel ()));
276281 checker ().verifyEquals ("Row data does not contain expected custom properties" , "PlainValueConcat" , dataRegion .getDataAsText (0 , calcCol .getLabel ()));
277282 clickAndWait (Locator .linkWithText ("CustomPropsSample" ));
278- assertTextPresent (stringCol1 .getLabel (), stringCol2 .getLabel (), calcCol .getLabel (), "PlainValue" , "PercentValue" , "PlainValueConcat" );
283+ assertTextPresent (stringCol1 .getLabel (), stringCol2 .getLabel (), stringCol3 . getLabel (), calcCol .getLabel (), "PlainValue" , "PercentValue" , "PlainValueConcat" );
279284 }
280285
281286 // Issue 47280: LKSM: Trailing/Leading whitespace in Source name won't resolve when deriving samples
0 commit comments