@@ -46,17 +46,20 @@ public void testMissingParentDirectoryRegression() throws Exception
4646 assayDesignerPage .goToBatchFields ().removeAllFields (true );
4747 // add by path so the absolute path is stored; this allows reproducing the missing parent dir scenario
4848 assayDesignerPage .addTransformScript (transformFile );
49- getArtifactCollector ().dumpPageSnapshot ("TransformScript_Added" );
5049 assayDesignerPage .clickSave ();
5150
52- // Now rename the parent dir to ensure we handle it reasonably. Deleting directories on Windows is not always
51+ // Rename the parent dir to ensure we handle it reasonably. Deleting directories on Windows is not always
5352 // timely, renaming the directory will have the same effect.
5453 String newName = "Not-Here-" + UUID .randomUUID ();
55- TestFileUtils .renameDir (parentDir , newName );
54+ Path renamedDir = TestFileUtils .renameDir (parentDir , newName );
5655
5756 Assert .assertFalse (String .format ("Directory %s is still present." , parentDir ),
5857 FileUtils .isDirectory (parentDir .toFile ()));
5958
59+ // Delete the renamed directory as a cleanup step. Since the directory has been renamed, the slow delete on Windows
60+ // will not cause the test to fail.
61+ TestFileUtils .deleteDir (renamedDir .toFile ());
62+
6063 // Attempt to import data and verify a reasonable error message is shown
6164 String importData = """
6265 VisitID\t ParticipantID\t Comment
@@ -94,6 +97,7 @@ public void testMissingParentDirectoryRegression() throws Exception
9497
9598 // Verify we land on the run details page and can see the run name (no transform needed)
9699 new AssayRunsPage (getDriver ()).clickAssayIdLink ("fixedAssayImport" );
100+
97101 }
98102
99103}
0 commit comments