copiedItem.contextMenu().menu("Open").click();
testEventsTable(RENAMED_TRACE_NAME);
fBot.closeAllEditors();
- SWTBotUtils.clearTracesFolder(fBot, TRACE_PROJECT_NAME);
+ SWTBotUtils.clearTracesFolderUI(fBot, TRACE_PROJECT_NAME);
}
/**
copiedItem.contextMenu().menu("Open").click();
testEventsTable(RENAMED_TRACE_NAME);
fBot.closeAllEditors();
- SWTBotUtils.clearTracesFolder(fBot, TRACE_PROJECT_NAME);
+ SWTBotUtils.clearTracesFolderUI(fBot, TRACE_PROJECT_NAME);
}
/**
assertTrue(originalEditor == fBot.activeEditor().getReference());
fBot.closeAllEditors();
- SWTBotUtils.clearTracesFolder(fBot, TRACE_PROJECT_NAME);
+ SWTBotUtils.clearTracesFolderUI(fBot, TRACE_PROJECT_NAME);
}
private static void createCopy(SWTBotTreeItem traceItem) {
});
}
+ /**
+ * Clear the trace folder (using the UI)
+ *
+ * @param bot
+ * a given workbench bot
+ * @param projectName
+ * the name of the project (needs to exist)
+ */
+ public static void clearTracesFolderUI(SWTWorkbenchBot bot, String projectName) {
+ SWTBotTreeItem tracesFolder = selectTracesFolder(bot, projectName);
+ tracesFolder.contextMenu().menu("Clear").click();
+ String CONFIRM_CLEAR_DIALOG_TITLE = "Confirm Clear";
+ bot.waitUntil(Conditions.shellIsActive(CONFIRM_CLEAR_DIALOG_TITLE));
+
+ SWTBotShell shell = bot.shell(CONFIRM_CLEAR_DIALOG_TITLE);
+ shell.bot().button("Yes").click();
+ bot.waitUntil(Conditions.shellCloses(shell));
+ bot.waitWhile(ConditionHelpers.treeItemHasChildren(tracesFolder));
+ }
+
/**
* Clear the experiment folder
*