use of org.eclipse.reddeer.swt.condition.ShellIsAvailable in project linuxtools by eclipse.
the class EditDockerFileTest method testEditDockerFile.
@Test
public void testEditDockerFile() {
getConnection();
DockerImagesTab imageTab = openDockerImagesTab();
try {
String dockerFilePath = new File(EDIT_DOCKERFILE_FOLDER).getCanonicalPath();
getConnection();
imageTab.activate();
new DefaultToolItem("Build Image").click();
new WaitUntil(new ShellIsAvailable("Build a Docker Image"));
new LabeledText("Image Name:").setText(IMAGE_NAME);
new LabeledText("Directory:").setText(dockerFilePath);
new PushButton("Edit Dockerfile").click();
new WaitUntil(new ShellIsAvailable("Dockerfile Editor"), TimePeriod.LONG);
DefaultStyledText defaultStyledText = new DefaultStyledText();
String editorText = defaultStyledText.getText();
assertTrue("Editor is empty!", StringUtils.isNotEmpty(editorText));
defaultStyledText.setText(BUILD_IMAGE);
CTabFolder tabFolder = new DefaultCTabFolder();
CTabItem tabItem = tabFolder.getSelection();
KeyboardFactory.getKeyboard().invokeKeyCombination(SWT.CTRL, 'S');
tabItem.close();
new DefaultShell("Build a Docker Image").setFocus();
new FinishButton().click();
new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG);
} catch (IOException ex) {
fail("Resource file not found!");
}
}
use of org.eclipse.reddeer.swt.condition.ShellIsAvailable in project linuxtools by eclipse.
the class NewDockerConnectionPage method finish.
public void finish() {
new WaitUntil(new ShellIsAvailable(NEW_DOCKER_CONNECTION_SHELL));
new WaitUntil(new ControlIsEnabled(new FinishButton()));
new FinishButton().click();
new WaitWhile(new ShellIsAvailable(NEW_DOCKER_CONNECTION_SHELL), TimePeriod.LONG);
new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG);
}
use of org.eclipse.reddeer.swt.condition.ShellIsAvailable in project linuxtools by eclipse.
the class AbstractView method openViaMenu.
private void openViaMenu() {
WithTextMatchers m = new WithTextMatchers(new RegexMatcher[] { new RegexMatcher("Window.*"), new RegexMatcher("Show View.*"), new RegexMatcher("Other...*") });
new ShellMenu().getItem(m.getMatchers()).select();
new DefaultShell(SHOW_VIEW);
new DefaultTreeItem(path).select();
new PushButton("Open").click();
new WaitWhile(new ShellIsAvailable(SHOW_VIEW));
new WaitUntil(new ViewCTabIsAvailable());
}
use of org.eclipse.reddeer.swt.condition.ShellIsAvailable in project linuxtools by eclipse.
the class DockerImagesTab method buildImage.
public void buildImage(String name, String directory) {
activate();
new DefaultToolItem("Build Image").click();
new WaitUntil(new ShellIsAvailable("Build a Docker Image"));
new LabeledText("Image Name:").setText(name);
new LabeledText("Directory:").setText(directory);
new FinishButton().click();
}
use of org.eclipse.reddeer.swt.condition.ShellIsAvailable in project linuxtools by eclipse.
the class RunDockerImageLaunchConfiguration method open.
/**
* Opens Run configuration dialog
*/
public void open() {
DockerPerspective p = new DockerPerspective();
p.open();
new ShellMenu().getItem("Run", "Run Configurations...").select();
new WaitUntil(new ShellIsAvailable("Run Configurations"));
}
Aggregations