use of org.eclipse.reddeer.swt.impl.shell.DefaultShell 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.shell.DefaultShell in project jbosstools-openshift by jbosstools.
the class TemplatesCreator method executeImport.
private void executeImport(boolean importProject) {
new DefaultShell(OpenShiftLabel.Shell.IMPORT_APPLICATION);
if (!importProject) {
new CancelButton().click();
} else {
new FinishButton().click();
try {
new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.CHEATSHEET), TimePeriod.LONG);
new DefaultShell(OpenShiftLabel.Shell.CHEATSHEET);
new CheckBox(0).click();
new NoButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.CHEATSHEET));
} catch (WaitTimeoutExpiredException ex) {
// do nothing if cheat sheet is not provided
}
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.NEW_APP_WIZARD), TimePeriod.LONG);
new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG);
}
}
use of org.eclipse.reddeer.swt.impl.shell.DefaultShell 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.shell.DefaultShell in project jbosstools-openshift by jbosstools.
the class NewOpenShift3ApplicationWizard method openWizardFromExplorer.
/**
* Opens a new OpenShift 3 application wizard from OpenShift Explorer view with the given project pre-selected.
* If the project is null, a generated project is used.
*/
public void openWizardFromExplorer(String project) {
OpenShiftExplorerView explorer = new OpenShiftExplorerView();
explorer.reopen();
selectExplorerProject(project, explorer);
new ContextMenuItem(OpenShiftLabel.ContextMenu.NEW_OS3_APPLICATION).select();
new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.NEW_APP_WIZARD), TimePeriod.LONG);
new DefaultShell(OpenShiftLabel.Shell.NEW_APP_WIZARD);
}
use of org.eclipse.reddeer.swt.impl.shell.DefaultShell in project jbosstools-openshift by jbosstools.
the class EnvironmentVariableWizardPage method resetEnvironmentVariable.
/**
* Resets environment variable to its default state.
*
* @param changedVar
* @param originalVar
* @return true if variable was reset successfully, false otherwise
*/
public boolean resetEnvironmentVariable(EnvVar changedVar, EnvVar defaultVar) {
DefaultTable table = new DefaultTable();
table.getItem(changedVar.getName()).select();
new PushButton(OpenShiftLabel.Button.RESET).click();
new DefaultShell(OpenShiftLabel.Shell.RESET_ENV_VAR);
new YesButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.RESET_ENV_VAR));
return table.containsItem(defaultVar.getName(), 0) && table.containsItem(defaultVar.getValue(), 1);
}
Aggregations