use of org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu in project linuxtools by eclipse.
the class DockerImageHierarchyViewSWTBotTest method shouldProvideEnabledAddTagCommandOnSelectedImage.
@Test
public void shouldProvideEnabledAddTagCommandOnSelectedImage() {
// given
shouldDisplayImageHierarchyViewWhenSelectingImage();
// when
selectImageInTreeView(bot, "root");
final SWTBotMenu menu = SWTUtils.getContextMenu(bot.viewById(DockerImageHierarchyView.VIEW_ID).bot().tree(), "Add Tag");
// then
MenuAssertion.assertThat(menu).isVisible().isEnabled();
}
use of org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu in project linuxtools by eclipse.
the class DockerImageHierarchyViewSWTBotTest method shouldProvideEnabledRemoveCommandOnSelectedContainer.
@Test
public void shouldProvideEnabledRemoveCommandOnSelectedContainer() {
// given
shouldDisplayImageHierarchyViewWhenSelectingImage();
// when
selectImageInTreeView(bot, "root", "foo_image1", "foo_image2", "foo_container21");
final SWTBotMenu menu = SWTUtils.getContextMenu(bot.viewById(DockerImageHierarchyView.VIEW_ID).bot().tree(), "Remove");
// then
MenuAssertion.assertThat(menu).isVisible().isEnabled();
}
use of org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu in project linuxtools by eclipse.
the class DockerImageHierarchyViewSWTBotTest method shouldProvideEnabledCommitCommandOnSelectedContainer.
@Test
public void shouldProvideEnabledCommitCommandOnSelectedContainer() {
// given
shouldDisplayImageHierarchyViewWhenSelectingImage();
// when
selectImageInTreeView(bot, "root", "foo_image1", "foo_image2", "foo_container21");
final SWTBotMenu menu = SWTUtils.getContextMenu(bot.viewById(DockerImageHierarchyView.VIEW_ID).bot().tree(), "Commit");
// then
MenuAssertion.assertThat(menu).isVisible().isEnabled();
}
use of org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu in project linuxtools by eclipse.
the class DockerImageHierarchyViewSWTBotTest method shouldProvideEnabledStartCommandOnSelectedContainer.
@Test
public void shouldProvideEnabledStartCommandOnSelectedContainer() {
// given
shouldDisplayImageHierarchyViewWhenSelectingImage();
// when
selectImageInTreeView(bot, "root", "foo_image1", "foo_image2", "foo_container21");
final SWTBotMenu menu = SWTUtils.getContextMenu(bot.viewById(DockerImageHierarchyView.VIEW_ID).bot().tree(), "Start");
// then
MenuAssertion.assertThat(menu).isVisible().isEnabled();
}
use of org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu in project linuxtools by eclipse.
the class BuildDockerImageShortcutSWTBotTest method getRunAsdockerImageBuildContextMenu.
/**
* @return the {@link SWTBotMenu} for the "Run as > Docker Image Build"
* shortcut
*/
private SWTBotMenu getRunAsdockerImageBuildContextMenu(final String projectName, final String dockerFileName) {
final SWTBotTreeItem fooProjectTreeItem = SWTUtils.getTreeItem(this.projectExplorerViewRule.getProjectExplorerBotView(), projectName);
assertThat(fooProjectTreeItem).isNotNull();
SWTUtils.syncExec(() -> fooProjectTreeItem.expand());
final SWTBotTreeItem dockerfileTreeItem = SWTUtils.getTreeItem(fooProjectTreeItem, dockerFileName);
assertThat(dockerfileTreeItem).isNotNull();
SWTUtils.select(dockerfileTreeItem);
final SWTBotMenu runAsDockerImageBuildMenu = SWTUtils.getContextMenu(this.projectExplorerViewRule.getProjectExplorerBotView().bot().tree(), "Run As", "1 Docker Image Build");
return runAsDockerImageBuildMenu;
}
Aggregations