use of org.eclipse.reddeer.swt.impl.toolbar.DefaultToolItem 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.impl.toolbar.DefaultToolItem in project linuxtools by eclipse.
the class DockerContainersTab method refresh.
public void refresh() {
this.activate();
new DefaultToolItem("Refresh (F5)").click();
}
use of org.eclipse.reddeer.swt.impl.toolbar.DefaultToolItem 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.impl.toolbar.DefaultToolItem in project linuxtools by eclipse.
the class DockerImagesTab method refresh.
public void refresh() {
activate();
new DefaultToolItem("Refresh (F5)").click();
}
use of org.eclipse.reddeer.swt.impl.toolbar.DefaultToolItem in project linuxtools by eclipse.
the class RunDockerImageLaunchConfiguration method createNewConfiguration.
/**
* Creates new Docker launch configuration
*/
public void createNewConfiguration(String configurationName) {
new DefaultTreeItem("Run Docker Image").select();
new DefaultToolItem("New launch configuration").click();
setName(configurationName);
}
Aggregations