use of org.eclipse.reddeer.swt.impl.button.OkButton in project jbosstools-openshift by jbosstools.
the class OpenShift3ConnectionWizard method finish.
/**
* Waits and clicks Finish button .
*/
public void finish() {
new WaitUntil(new ControlIsEnabled(new FinishButton()), TimePeriod.LONG);
new FinishButton().click();
new WaitWhile(new JobIsRunning(), TimePeriod.DEFAULT, false);
// check for Wizard closing dialog
try {
new WaitUntil(new ShellIsAvailable("Wizard closing"), TimePeriod.MEDIUM);
new OkButton().click();
new WaitWhile(new ShellIsAvailable("Wizard closing"), TimePeriod.MEDIUM, false);
new WaitWhile(new JobIsRunning(), TimePeriod.DEFAULT, false);
new FinishButton().click();
} catch (WaitTimeoutExpiredException exc) {
// dialog not shown, continue
}
waitForShellToClose(getShell());
}
use of org.eclipse.reddeer.swt.impl.button.OkButton in project jbosstools-openshift by jbosstools.
the class TemplatesCreator method createOpenShiftApplicationBasedOnTemplate.
private void createOpenShiftApplicationBasedOnTemplate(boolean importProject, boolean serverTemplate, String templateName, final String templateLocalPath, List<Label> labels, TemplateParameter... parameters) {
if (serverTemplate) {
selectServerTemplate(templateName);
} else {
selectLocalTemplate(templateLocalPath);
}
new WaitUntil(new ControlIsEnabled(new NextButton()), TimePeriod.DEFAULT);
new NextButton().click();
new WaitUntil(new ControlIsEnabled(new BackButton()), TimePeriod.LONG);
if (parameters != null && parameters.length != 0) {
setTemplateParameters(parameters);
}
new NextButton().click();
new WaitWhile(new ControlIsEnabled(new NextButton()), TimePeriod.LONG);
if (labels != null && labels.size() != 0) {
createOpenShiftLabels(labels);
}
new FinishButton().click();
new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.APPLICATION_SUMMARY), TimePeriod.LONG);
new DefaultShell(OpenShiftLabel.Shell.APPLICATION_SUMMARY);
new OkButton().click();
new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.IMPORT_APPLICATION));
executeImport(importProject);
}
use of org.eclipse.reddeer.swt.impl.button.OkButton in project jbosstools-openshift by jbosstools.
the class TemplatesCreator method setTemplateParameters.
private void setTemplateParameters(TemplateParameter[] parameters) {
for (TemplateParameter parameter : parameters) {
new DefaultTable().select(parameter.getName());
new WaitUntil(new ControlIsEnabled(new PushButton(OpenShiftLabel.Button.EDIT)));
new PushButton(OpenShiftLabel.Button.EDIT).click();
new DefaultShell(OpenShiftLabel.Shell.EDIT_TEMPLATE_PARAMETER);
new DefaultText().setText(parameter.getValue());
new WaitUntil(new ControlIsEnabled(new OkButton()));
new OkButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.EDIT_TEMPLATE_PARAMETER));
new DefaultShell(OpenShiftLabel.Shell.NEW_APP_WIZARD);
}
}
use of org.eclipse.reddeer.swt.impl.button.OkButton in project jbosstools-openshift by jbosstools.
the class TemplatesCreator method createOpenShiftLabels.
private void createOpenShiftLabels(List<Label> labels) {
for (Label label : labels) {
new PushButton(OpenShiftLabel.Button.ADD).click();
new DefaultShell(OpenShiftLabel.Shell.RESOURCE_LABEL);
new LabeledText(OpenShiftLabel.TextLabels.LABEL).setText(label.getName());
new LabeledText(OpenShiftLabel.TextLabels.VALUE).setText(label.getValue());
new WaitUntil(new ControlIsEnabled(new OkButton()));
new OkButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.RESOURCE_LABEL));
new DefaultShell(OpenShiftLabel.Shell.NEW_APP_WIZARD);
}
}
use of org.eclipse.reddeer.swt.impl.button.OkButton in project jbosstools-openshift by jbosstools.
the class EnvironmentVariableWizardPage method addEnvironmentVariable.
/**
* Creates a new environment variable.
*
* @param envVar environment variable to create
* @return true if environment variable was created successfully, false otherwise
*/
public boolean addEnvironmentVariable(EnvVar envVar) {
DefaultTable table = new DefaultTable();
new PushButton(OpenShiftLabel.Button.ADD).click();
new DefaultShell(OpenShiftLabel.Shell.ENVIRONMENT_VARIABLE);
new LabeledText("Name:").setText(envVar.getName());
new LabeledText("Value:").setText(envVar.getValue());
new OkButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.ENVIRONMENT_VARIABLE));
return table.containsItem(envVar.getName(), 0) && table.containsItem(envVar.getValue(), 1);
}
Aggregations