@Test
	public void testDeleteFolder() throws Exception {
		DomainFolder f = rootFolder.createFolder("myFolder");
		f = f.createFolder("A");
		f = f.createFolder("B");
		f = f.createFolder("C");

		createNotepadFile(f);

		GTreeNode myNode = getChild(rootNode, "myFolder");
		expandTreePath(myNode.getTreePath());

		// delete "A"; all subfolders should be removed
		GTreeNode aNode = getChild(myNode, "A");
		expandTreePath(aNode.getTreePath());
		setSelectionPaths(new TreePath[] { aNode.getTreePath() });
		GTreeNode bNode = getChild(aNode, "B");

		// ensure that selection occurred
		assertNotNull(tree.getSelectionPath());

		pressDelete();

		confirmDelete();

		waitForTasks();

		assertNull(getChild(myNode, "A"));
		assertNull(bNode.getParent());
	}
Tests for actions in the front end (Ghidra project window)
Ghidra/Features/Base/src/test.slow/java/ghidra/framework/main/datatree/FrontEndPluginActionsTest.java