use of org.eclipse.reddeer.swt.impl.shell.DefaultShell in project linuxtools by eclipse.
the class RunDockerImageLaunchConfiguration method deleteRunConfiguration.
public void deleteRunConfiguration(String configuratioName) {
selectConfiguration(configuratioName);
new DefaultToolItem(DELETE_LAUNCH_CONFIGURATION_LABEL).click();
Shell deleteShell = new DefaultShell("Confirm Launch Configuration Deletion");
WidgetIsFound deleteButton = new WidgetIsFound(org.eclipse.swt.widgets.Button.class, deleteShell.getSWTWidget(), new WithMnemonicTextMatcher("Delete"));
Button button;
if (deleteButton.test()) {
// photon changed button text
button = new PushButton(deleteShell, "Delete");
} else {
button = new YesButton(deleteShell);
}
button.click();
new WaitWhile(new ShellIsAvailable(deleteShell));
new WaitUntil(new ShellIsAvailable("Run Configurations"));
}
use of org.eclipse.reddeer.swt.impl.shell.DefaultShell in project linuxtools by eclipse.
the class RunDockerImageLaunchConfiguration method searchImage.
public void searchImage(String imageName, String tag) {
selectTab(MAIN_TAB_LABEL);
new PushButton("Search...");
ImageSearchPage pageOne = new ImageSearchPage(new DefaultCTabItem(MAIN_TAB_LABEL));
pageOne.searchImage(imageName);
pageOne.next();
new WaitWhile(new ShellIsActive("Progress Information"), TimePeriod.DEFAULT);
ImageTagSelectionPage pageTwo = new ImageTagSelectionPage(pageOne);
assertFalse("Search tags are empty!", pageTwo.getTags().isEmpty());
new WaitWhile(new JobIsRunning(), TimePeriod.DEFAULT);
assertTrue("Search results do not contains tag:" + tag + "!", pageTwo.tagsContains(tag));
pageTwo.selectTag(tag);
pageTwo.finish();
new DefaultShell("Pull Image");
new PushButton("Finish").click();
new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG);
}
use of org.eclipse.reddeer.swt.impl.shell.DefaultShell in project linuxtools by eclipse.
the class DockerConnection method pullImage.
public void pullImage(String imageName, String imageTag, String dockerRegister) {
if (getImage(imageName, imageTag) == null) {
refreshImages();
treeViewerHandler.getTreeItem(item, "Images").select();
new ContextMenu().getItem("Pull...").select();
new WaitUntil(new ShellIsAvailable("Pull Image"), TimePeriod.DEFAULT);
Shell pullShell = new DefaultShell("Pull Image");
// select register
if (dockerRegister != null) {
Combo combo = new DefaultCombo();
combo.setSelection(dockerRegister);
}
new LabeledText(IMAGE_NAME_LABEL_DIALOG).setFocus();
new LabeledText(IMAGE_NAME_LABEL_DIALOG).setText(imageTag == null ? imageName : imageName + ":" + imageTag);
new WaitUntil(new ControlIsEnabled(new FinishButton()));
new FinishButton(pullShell).click();
new WaitWhile(new ShellIsAvailable(pullShell));
new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG);
}
}
use of org.eclipse.reddeer.swt.impl.shell.DefaultShell in project linuxtools by eclipse.
the class DockerImage method pushImage.
public void pushImage(String registryAccount, boolean forceTagging, boolean keepTaggedImage) {
select();
new ContextMenu().getItem("Push...").select();
new DefaultShell("Push Image");
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.shell.DefaultShell in project linuxtools by eclipse.
the class DockerImage method remove.
/**
* * Removes docker image.
*/
public void remove() {
select();
new ContextMenu().getItem("Remove").select();
Shell confirm = new DefaultShell("Confirm Remove Image");
new OkButton().click();
new WaitWhile(new ShellIsAvailable(confirm));
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
}
Aggregations