use of org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu in project linuxtools by eclipse.
the class DockerExplorerViewSWTBotTest method shouldProvideDisabledStopCommandOnMultipleContainersAtOnce.
@Test
public void shouldProvideDisabledStopCommandOnMultipleContainersAtOnce() {
// given
final DockerClient client = MockDockerClientFactory.container(MockContainerFactory.name("gentle_foo").status("Running").build()).container(MockContainerFactory.name("angry_bar").status("Stopped").build()).build();
final DockerConnection dockerConnection = MockDockerConnectionFactory.from("Test", client).withDefaultTCPConnectionSettings();
DockerConnectionManagerUtils.configureConnectionManager(dockerConnection);
// open the context menu on one of the containers
selectContainersInTreeView("Test", "gentle_foo", "angry_bar");
final SWTBotMenu menuCommand = dockerExplorerViewBot.bot().tree().contextMenu("Stop");
// then
MenuAssertion.assertThat(menuCommand).isVisible().isNotEnabled();
}
use of org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu in project linuxtools by eclipse.
the class DockerImageHierarchyViewSWTBotTest method shouldProvideEnabledPushCommandOnSelectedImage.
@Test
public void shouldProvideEnabledPushCommandOnSelectedImage() {
// given
shouldDisplayImageHierarchyViewWhenSelectingImage();
// when
selectImageInTreeView(bot, "root");
final SWTBotMenu menu = SWTUtils.getContextMenu(bot.viewById(DockerImageHierarchyView.VIEW_ID).bot().tree(), "Push...");
// then
MenuAssertion.assertThat(menu).isVisible().isEnabled();
}
use of org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu in project linuxtools by eclipse.
the class DockerImageHierarchyViewSWTBotTest method shouldProvideEnabledPauseCommandOnSelectedContainer.
@Test
public void shouldProvideEnabledPauseCommandOnSelectedContainer() {
// given
shouldDisplayImageHierarchyViewWhenSelectingImage();
// when
selectImageInTreeView(bot, "root", "foo_image1", "foo_container1");
final SWTBotMenu menu = SWTUtils.getContextMenu(bot.viewById(DockerImageHierarchyView.VIEW_ID).bot().tree(), "Pause");
// then
MenuAssertion.assertThat(menu).isVisible().isEnabled();
}
use of org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu in project linuxtools by eclipse.
the class DockerImageHierarchyViewSWTBotTest method shouldProvideEnabledUnpauseCommandOnSelectedContainer.
@Test
public void shouldProvideEnabledUnpauseCommandOnSelectedContainer() {
// given
shouldDisplayImageHierarchyViewWhenSelectingImage();
// when
selectImageInTreeView(bot, "root", "foo_image1", "foo_image2", "foo_container22");
final SWTBotMenu menu = SWTUtils.getContextMenu(bot.viewById(DockerImageHierarchyView.VIEW_ID).bot().tree(), "Unpause");
// then
MenuAssertion.assertThat(menu).isVisible().isEnabled();
}
use of org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu in project linuxtools by eclipse.
the class DockerImageHierarchyViewSWTBotTest method shouldProvideEnabledRemoveCommandOnSelectedImage.
@Test
public void shouldProvideEnabledRemoveCommandOnSelectedImage() {
// given
shouldDisplayImageHierarchyViewWhenSelectingImage();
// when
selectImageInTreeView(bot, "root");
final SWTBotMenu menu = SWTUtils.getContextMenu(bot.viewById(DockerImageHierarchyView.VIEW_ID).bot().tree(), "Remove");
// then
MenuAssertion.assertThat(menu).isVisible().isEnabled();
}
Aggregations