use of org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView in project linuxtools by eclipse.
the class DockerImageHierarchyViewSWTBotTest method selectImageInTreeView.
private static SWTBotTreeItem selectImageInTreeView(final SWTWorkbenchBot bot, final String... path) {
final SWTBotView dockerImageHierarchyViewBot = bot.viewById(DockerImageHierarchyView.VIEW_ID);
final DockerImageHierarchyView dockerImageHierarchyView = (DockerImageHierarchyView) (dockerImageHierarchyViewBot.getViewReference().getView(true));
SWTUtils.asyncExec(() -> dockerImageHierarchyView.getCommonViewer().expandAll());
// containers)
return SWTUtils.getTreeItem(dockerImageHierarchyViewBot, path).select();
}
use of org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView in project linuxtools by eclipse.
the class SVNReporsitoriesView method discardRepository.
/**
* Select repository
*/
public void discardRepository(String repo) {
SWTBotView svnRepoView = bot.viewByTitle("SVN Repositories");
svnRepoView.show();
svnRepoView.setFocus();
SWTBotTree tree = svnRepoView.bot().tree();
tree.select(repo);
// discard
clickOnDiscardRepo(tree);
}
use of org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView in project linuxtools by eclipse.
the class PreferencesTest method testProfileProjectActions.
private void testProfileProjectActions(SWTWorkbenchBot bot) throws Exception {
testPreferencesPage();
// Focus on project explorer view.
// $NON-NLS-1$
SWTBotView projectExplorer = bot.viewByTitle("Project Explorer");
projectExplorer.bot().tree().select(PROJ_NAME);
final Shell shellWidget = bot.activeShell().widget;
// Open profiling configurations dialog
UIThreadRunnable.asyncExec(() -> {
DebugUITools.openLaunchConfigurationDialogOnGroup(shellWidget, (StructuredSelection) PlatformUI.getWorkbench().getWorkbenchWindows()[0].getSelectionService().getSelection(), // $NON-NLS-1$
"org.eclipse.debug.ui.launchGroup.profilee");
});
// $NON-NLS-1$
SWTBotShell shell = bot.shell("Profiling Tools Configurations");
shell.activate();
// Create new profiling configuration
SWTBotTree profilingConfigs = bot.tree();
// $NON-NLS-1$
SWTBotTree perfNode = profilingConfigs.select("Profile Timing");
// $NON-NLS-1$
perfNode.contextMenu("New").click();
// $NON-NLS-1$
bot.button("Profile").click();
bot.waitUntil(Conditions.shellCloses(shell));
// Assert that the expected tool is running.
// $NON-NLS-1$
SWTBotShell profileShell = bot.shell("Successful profile launch").activate();
assertNotNull(profileShell);
// $NON-NLS-1$
bot.button("Apply and Close").click();
bot.waitUntil(shellCloses(profileShell));
}
use of org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView in project linuxtools by eclipse.
the class TestUtils method enterProjectFolder.
/**
* Enter the project folder so as to avoid expanding trees later
*/
public static SWTBotView enterProjectFolder(SWTWorkbenchBot bot) {
SWTBotView navigator = bot.viewByTitle(ICreaterepoTestConstants.NAVIGATOR);
navigator.setFocus();
navigator.bot().tree().select(ICreaterepoTestConstants.PROJECT_NAME).contextMenu(ICreaterepoTestConstants.GO_INTO).click();
bot.waitUntil(waitForWidget(WidgetMatcherFactory.withText(ICreaterepoTestConstants.PROJECT_NAME), navigator.getWidget()));
return navigator;
}
use of org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView in project linuxtools by eclipse.
the class AbstractStyledTextViewTest method testPerfView.
@Override
protected void testPerfView() {
SWTWorkbenchBot bot = new SWTWorkbenchBot();
Matcher<IViewReference> withPartName = withPartName(getViewId());
SWTBotView view = bot.view(withPartName);
assertNotNull(view);
view.setFocus();
SWTBotStyledText text = bot.styledText();
assertNotNull(text);
assertEquals(getExpectedText(), text.getText());
}
Aggregations