/** Import a gzip trace */ @Test public void testGzipImport() { final String traceType = "Test trace : TMF Tests"; final String tracesNode = "Traces [1]"; /* * Actual importing */ openImportWizard(); selectImportFromArchive(fGzipTrace.getAbsolutePath()); selectFolder(ROOT_FOLDER); SWTBotCheckBox checkBox = fBot.checkBox(Messages.ImportTraceWizard_CreateLinksInWorkspace); assertFalse(checkBox.isEnabled()); SWTBotCombo comboBox = fBot.comboBoxWithLabel(Messages.ImportTraceWizard_TraceType); comboBox.setSelection(traceType); importFinish(); /* * Remove .gz extension */ assertNotNull(fGzipTrace); String name = fGzipTrace.getName(); assertNotNull(name); assertTrue(name.length() > 3); String traceName = name.substring(0, name.length() - 3); assertNotNull(traceName); assertFalse(traceName.isEmpty()); /* * Open trace */ SWTBotView projectExplorer = fBot.viewById(IPageLayout.ID_PROJECT_EXPLORER); projectExplorer.setFocus(); final SWTBotTree tree = projectExplorer.bot().tree(); /* * This appears to be problematic due to the length of the file name and * the resolution in our CI. */ tree.expandNode(PROJECT_NAME, true); SWTBotTreeItem treeItem = tree.getTreeItem(PROJECT_NAME); fBot.waitUntil(ConditionHelpers.IsTreeChildNodeAvailable(tracesNode, treeItem)); treeItem = treeItem.getNode(tracesNode); fBot.waitUntil(ConditionHelpers.IsTreeChildNodeAvailable(traceName, treeItem)); treeItem = treeItem.getNode(traceName); treeItem.doubleClick(); SWTBotUtils.waitForJobs(); /* * Check results */ SWTBotTable editor = fBot.activeEditor().bot().table(); String c22 = editor.cell(2, 2); String c10 = editor.cell(1, 0); assertEquals("Type-1", c22); assertEquals("", c10); }