Skip to content

Commit eb3afcb

Browse files
Account for sample types that may have been defined in other tests (#2943)
1 parent cbae382 commit eb3afcb

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/org/labkey/test/tests/SampleTypeFolderExportImportTest.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -566,8 +566,12 @@ public void testExportImportSampleTypesWithSubfolder()
566566
List<FieldDefinition> testFields = SampleTypeAPIHelper.sampleTypeTestFields(false);
567567
SampleTypeDefinition testSampleType = new SampleTypeDefinition(projectSampleType).setFields(testFields);
568568
SampleTypeAPIHelper.createEmptySampleType(getProjectName(), testSampleType);
569-
570569
goToProjectHome();
570+
PortalHelper portalHelper = new PortalHelper(this);
571+
portalHelper.addWebPart("Sample Types");
572+
DataRegionTable table = DataRegionTable.DataRegion(getDriver()).withName("SampleSet").waitFor();
573+
List<String> exportedNames = table.getColumnDataAsText("Name");
574+
571575
ExportFolderPage exportPage = goToFolderManagement()
572576
.goToExportTab();
573577
exportPage.includeSubfolders(true);
@@ -576,11 +580,11 @@ public void testExportImportSampleTypesWithSubfolder()
576580
goToProjectHome(importProject);
577581
importFolderFromZip(exportedFolderFile, false, 1);
578582
goToProjectFolder(importProject, subfolder);
579-
PortalHelper portalHelper = new PortalHelper(this);
583+
portalHelper = new PortalHelper(this);
580584
portalHelper.addWebPart("Sample Types");
581-
DataRegionTable table = DataRegionTable.DataRegion(getDriver()).withName("SampleSet").waitFor();
585+
table = DataRegionTable.DataRegion(getDriver()).withName("SampleSet").waitFor();
582586
List<String> typeNames = table.getColumnDataAsText("Name");
583-
checker().verifyEquals("Type names not as expected", List.of(projectSampleType), typeNames);
587+
checker().verifyEquals("Type names not as expected", exportedNames, typeNames);
584588
}
585589

586590
@Test

0 commit comments

Comments
 (0)