use of org.eclipse.reddeer.swt.impl.text.LabeledText in project jbosstools-openshift by jbosstools.
the class CDKServerEditorAbstractTest method checkEditorStateAfterSave.
protected void checkEditorStateAfterSave(String location, boolean canSave) {
LabeledText label = ((CDKPart) editor).getMinishiftBinaryLabel();
label.setText(location);
new WaitUntil(new SystemJobIsRunning(getJobMatcher(MINISHIFT_VALIDATION_JOB)), TimePeriod.SHORT, false);
new WaitWhile(new SystemJobIsRunning(getJobMatcher(MINISHIFT_VALIDATION_JOB)), TimePeriod.DEFAULT, false);
if (canSave) {
verifyEditorCanSave();
} else {
verifyEditorCannotSave();
}
}
use of org.eclipse.reddeer.swt.impl.text.LabeledText in project jbosstools-openshift by jbosstools.
the class LabelsTest method setInvalidValue.
private void setInvalidValue(String value) {
new LabeledText(OpenShiftLabel.TextLabels.VALUE).setText(value);
assertFalse("OK button should be disable for invalid value, but it is not.", buttonIsEnabled(new OkButton()));
}
use of org.eclipse.reddeer.swt.impl.text.LabeledText in project jbosstools-openshift by jbosstools.
the class OpenNewApplicationWizardWithNoProjectTest method testOpenNewApplicationWizardFromCentralWithNoProjects.
@Test
public void testOpenNewApplicationWizardFromCentralWithNoProjects() {
new DefaultToolItem(new WorkbenchShell(), OpenShiftLabel.Others.RED_HAT_CENTRAL).click();
new InternalBrowser().execute(OpenShiftLabel.Others.OPENSHIFT_CENTRAL_SCRIPT);
new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.NEW_APP_WIZARD), TimePeriod.LONG);
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();
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.text.LabeledText 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.text.LabeledText in project jbosstools-openshift by jbosstools.
the class OpenNewApplicationWizardWithNoProjectTest method testOpenNewApplicationWizardFromOpenShiftExplorerWithNoProjectsAndCancelNewProject.
@Test
public void testOpenNewApplicationWizardFromOpenShiftExplorerWithNoProjectsAndCancelNewProject() {
clearLog();
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 CancelButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.CREATE_OS_PROJECT), TimePeriod.LONG);
// do not click! New App wizard should close on canceling New Project wizard.
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.NEW_APP_WIZARD), TimePeriod.LONG);
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
checkErrorLog();
clearLog();
}
Aggregations