use of org.eclipse.reddeer.swt.api.CTabItem 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.api.CTabItem in project linuxtools by eclipse.
the class DockerTerminal method getPage.
public CTabItem getPage(String pageLabel) {
CTabFolder tabFolder = new DefaultCTabFolder();
CTabItem tabItem = tabFolder.getSelection();
tabItem.activate();
return tabItem;
}
use of org.eclipse.reddeer.swt.api.CTabItem in project linuxtools by eclipse.
the class EditDockerfile method getPage.
public CTabItem getPage(String pageLabel) {
CTabFolder tabFolder = new DefaultCTabFolder();
CTabItem tabItem = tabFolder.getSelection();
tabItem.activate();
return tabItem;
}
use of org.eclipse.reddeer.swt.api.CTabItem in project linuxtools by eclipse.
the class ContainerLogTest method cleanDockerTerminal.
private void cleanDockerTerminal() {
if (!mockitoIsUsed()) {
DockerTerminal dockerTerminal = new DockerTerminal();
dockerTerminal.activate();
CTabItem tabItem = dockerTerminal.getPage(CONTAINER_NAME);
tabItem.close();
dockerTerminal.close();
}
}
Aggregations