use of org.eclipse.reddeer.swt.condition.ShellIsAvailable 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.condition.ShellIsAvailable in project jbosstools-openshift by jbosstools.
the class OpenNewApplicationWizardWithNoProjectTest method closeWizard.
private void closeWizard() {
new CancelButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.NEW_APP_WIZARD), TimePeriod.LONG);
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
}
use of org.eclipse.reddeer.swt.condition.ShellIsAvailable in project jbosstools-openshift by jbosstools.
the class CreateApplicationFromTemplateTest method importApplicationAndVerify.
public static void importApplicationAndVerify(String projectName) {
new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.IMPORT_APPLICATION));
new DefaultShell(OpenShiftLabel.Shell.IMPORT_APPLICATION);
try {
new CheckBox(new WithTextMatcher(new StringStartsWith("Do not clone"))).toggle(true);
} catch (CoreLayerException ex) {
// git directory is not in use
} catch (WaitTimeoutExpiredException ex) {
// swallow, checkbox is disabled
}
new FinishButton().click();
ProjectExplorer projectExplorer = new ProjectExplorer();
projectExplorer.open();
OpenShiftUtils.handleCheatSheetCreateServerAdapter();
new WaitUntil(new ProjectExists(projectName, new ProjectExplorer()), TimePeriod.LONG, false);
assertTrue("Project Explorer should contain imported project " + projectName, projectExplorer.containsProject(projectName));
}
use of org.eclipse.reddeer.swt.condition.ShellIsAvailable in project jbosstools-openshift by jbosstools.
the class LabelsTest method closeNewApplicationWizard.
@After
public void closeNewApplicationWizard() {
new CancelButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.NEW_APP_WIZARD), TimePeriod.LONG);
new WaitWhile(new JobIsRunning());
}
use of org.eclipse.reddeer.swt.condition.ShellIsAvailable in project jbosstools-openshift by jbosstools.
the class OpenNewApplicationWizardTest method closeWizard.
private void closeWizard() {
new CancelButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.NEW_APP_WIZARD), TimePeriod.LONG);
new WaitWhile(new JobIsRunning());
}
Aggregations