use of org.eclipse.reddeer.swt.impl.combo.LabeledCombo in project jbosstools-openshift by jbosstools.
the class OpenNewApplicationWizardWithNoProjectTest method testOpenNewApplicationWizardFromOpenShiftExplorerWithNoProjects.
@Test
public void testOpenNewApplicationWizardFromOpenShiftExplorerWithNoProjects() {
OpenShiftExplorerView explorer = new OpenShiftExplorerView();
explorer.reopen();
OpenShift3Connection connection = explorer.getOpenShift3Connection(connectionReq.getConnection());
connection.select();
new ContextMenuItem(OpenShiftLabel.ContextMenu.NEW_OS3_APPLICATION).select();
try {
new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.CREATE_OS_PROJECT), TimePeriod.LONG);
} catch (WaitTimeoutExpiredException ex) {
fail("Shell to create a new OpenShift application was supposed to be opened. But it's not.");
}
new DefaultShell(OpenShiftLabel.Shell.CREATE_OS_PROJECT);
new LabeledText(OpenShiftLabel.TextLabels.PROJECT_NAME).setText(projectName);
new FinishButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.CREATE_OS_PROJECT), TimePeriod.LONG);
new WaitWhile(new JobIsRunning());
new DefaultShell(OpenShiftLabel.Shell.NEW_APP_WIZARD);
assertTrue("Created project was not preselected for a new OpenShift application. Could be failing because " + "of https://issues.jboss.org/browse/JBIDE-21593.", new LabeledCombo(OpenShiftLabel.TextLabels.PROJECT).getSelection().equals(projectName));
closeWizard();
}
use of org.eclipse.reddeer.swt.impl.combo.LabeledCombo in project jbosstools-openshift by jbosstools.
the class OpenNewApplicationWizardWithNoProjectTest method testOpenNewApplicationWizardViaShellMenuWithNoProjects.
@Test
public void testOpenNewApplicationWizardViaShellMenuWithNoProjects() {
new WorkbenchShell().setFocus();
new ShellMenuItem("File", "New", "Other...").select();
new DefaultShell("New").setFocus();
new DefaultTreeItem("OpenShift", "OpenShift Application").select();
new NextButton().click();
new DefaultShell(OpenShiftLabel.Shell.NEW_APP_WIZARD);
for (String comboItem : new DefaultCombo(0).getItems()) {
if (comboItem.contains(connectionReq.getUsername()) && comboItem.contains(connectionReq.getHost())) {
new DefaultCombo(0).setSelection(comboItem);
break;
}
}
new NextButton().click();
TestUtils.acceptSSLCertificate();
new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.CREATE_OS_PROJECT), TimePeriod.LONG);
new DefaultShell(OpenShiftLabel.Shell.CREATE_OS_PROJECT);
new LabeledText(OpenShiftLabel.TextLabels.PROJECT_NAME).setText(projectName);
new FinishButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.CREATE_OS_PROJECT), TimePeriod.LONG);
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
new WaitUntil(new ControlIsEnabled(new BackButton()), TimePeriod.LONG);
new DefaultShell(OpenShiftLabel.Shell.NEW_APP_WIZARD);
assertTrue("Created project was not preselected for a new OpenShift application", new LabeledCombo(OpenShiftLabel.TextLabels.PROJECT).getText().equals(projectName));
closeWizard();
}
use of org.eclipse.reddeer.swt.impl.combo.LabeledCombo in project jbosstools-openshift by jbosstools.
the class DeployDockerImageTest method selectProjectAndVerifyDataProcessingInDeployToOpenShiftWizard.
/**
* Selects a specified project and verify it is correctly processed in Deploy Image
* to OpenShift wizard as well as processing of docker image details.
*
* @param projectName
* @param projectDisplayName
*/
private void selectProjectAndVerifyDataProcessingInDeployToOpenShiftWizard(String projectName) {
assertTrue("Wrong project has been preselected.", new LabeledCombo("OpenShift Project: ").getSelection().equals(projectName));
assertTrue("Selected docker image should be used in wizard but it is not.", new LabeledText(OpenShiftLabel.TextLabels.IMAGE_NAME).getText().contains(HELLO_OS_DOCKER_IMAGE));
assertTrue("Resource should be infered from image name but it is not", new LabeledText(OpenShiftLabel.TextLabels.RESOURCE_NAME).getText().contains(HELLO_OS_DOCKER_IMAGE.split("/")[2]));
}
use of org.eclipse.reddeer.swt.impl.combo.LabeledCombo in project linuxtools by eclipse.
the class ComposeTest method importProject.
private void importProject(String path) {
new ShellMenu().getItem("File", "Open Projects from File System...").select();
new LabeledCombo("Import source:").setText(path);
new FinishButton().click();
new WaitWhile(new JobIsRunning());
}
use of org.eclipse.reddeer.swt.impl.combo.LabeledCombo in project linuxtools by eclipse.
the class ImageRunSelectionPage method addLinkToContainer.
public void addLinkToContainer(String containerName, String alias) {
new PushButton(1, new WithTextMatcher("Add...")).click();
new DefaultShell("Container Linking");
new LabeledCombo("Container:").setText(containerName);
new LabeledText("Alias:").setText(alias);
new OkButton().click();
}
Aggregations