use of org.eclipse.reddeer.swt.impl.menu.ContextMenu in project linuxtools by eclipse.
the class ContainerLogTest method getContainerLog.
private String getContainerLog() {
new ContextMenu().getItem("Display Log").select();
String consoleText;
if (mockitoIsUsed()) {
ConsoleView consoleView = new ConsoleView();
consoleView.open();
consoleView = MockUtils.getConsoleViewText(CONSOLE_TEXT);
consoleText = consoleView.getConsoleText();
} else {
DockerTerminal dockerTerminal = new DockerTerminal();
dockerTerminal.activate();
consoleText = dockerTerminal.getTextFromPage(CONTAINER_NAME);
}
return consoleText;
}
use of org.eclipse.reddeer.swt.impl.menu.ContextMenu in project linuxtools by eclipse.
the class DockerImagesTab method addTagToImage.
public void addTagToImage(String imageName, String newTag) {
selectImage(imageName);
new ContextMenu().getItem("Add Tag").select();
new DefaultShell("Tag Image");
new LabeledText("New Tag:").setText(newTag);
new FinishButton().click();
}
use of org.eclipse.reddeer.swt.impl.menu.ContextMenu in project linuxtools by eclipse.
the class DockerImagesTab method pushImage.
public void pushImage(String imageName, String registryAccount, boolean forceTagging, boolean keepTaggedImage) {
selectImage(imageName);
new ContextMenu().getItem("Push...").select();
Combo combo = new DefaultCombo();
combo.setSelection(registryAccount);
new CheckBox("Force tagging image with selected registry").toggle(forceTagging);
new CheckBox("Keep tagged image upon completion").toggle(keepTaggedImage);
new FinishButton().click();
}
use of org.eclipse.reddeer.swt.impl.menu.ContextMenu in project linuxtools by eclipse.
the class DockerImagesTab method removeTagFromImage.
public void removeTagFromImage(String imageName, String tagToBeRemoved) {
selectImage(imageName);
new ContextMenu().getItem("Remove Tag").select();
String fullTag = "";
Combo combo = new DefaultCombo();
List<String> comboItems = combo.getItems();
for (String item : comboItems) {
if (item.contains(tagToBeRemoved)) {
fullTag = item;
break;
}
}
combo.setSelection(fullTag);
new FinishButton().click();
}
use of org.eclipse.reddeer.swt.impl.menu.ContextMenu in project linuxtools by eclipse.
the class DockerConnection method refreshContainers.
/**
* Refresh containers.
*/
public void refreshContainers() {
treeViewerHandler.getTreeItem(item, "Containers").select();
new ContextMenu().getItem("Refresh").select();
new WaitWhile(new JobIsRunning());
}
Aggregations