use of org.eclipse.reddeer.swt.impl.button.PushButton in project jbosstools-openshift by jbosstools.
the class ResourceLabelsWizardPage method editLabel.
/**
* Changes resource label to have a new name and value.
* @param name current name of resource label
* @param newName new name of resource label
* @param newValue new value of resource label
* @return true if resource label was successfully modified, false otherwise
*/
public boolean editLabel(String name, String newName, String newValue) {
new DefaultTable().select(name);
new PushButton(OpenShiftLabel.Button.EDIT).click();
new DefaultShell(OpenShiftLabel.Shell.RESOURCE_LABEL);
new LabeledText(OpenShiftLabel.TextLabels.LABEL).setText(newName);
new LabeledText(OpenShiftLabel.TextLabels.VALUE).setText(newValue);
new WaitUntil(new ControlIsEnabled(new OkButton()));
new OkButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.RESOURCE_LABEL));
return new DefaultTable().containsItem(newName, 0) && new DefaultTable().containsItem(newValue, 1);
}
use of org.eclipse.reddeer.swt.impl.button.PushButton in project jbosstools-openshift by jbosstools.
the class ResourceLabelsWizardPage method createLabel.
/**
* Creates a new resource label with specified name and value.
*
* @param name name of label
* @param value value of label
* @return true if label was created successfully, false otherwise
*/
public boolean createLabel(String name, String value) {
new PushButton(OpenShiftLabel.Button.ADD).click();
new DefaultShell(OpenShiftLabel.Shell.RESOURCE_LABEL);
new LabeledText(OpenShiftLabel.TextLabels.LABEL).setText(name);
new LabeledText(OpenShiftLabel.TextLabels.VALUE).setText(value);
new WaitUntil(new ControlIsEnabled(new OkButton()));
new OkButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.RESOURCE_LABEL));
return new DefaultTable().containsItem(name, 0) && new DefaultTable().containsItem(value, 1);
}
use of org.eclipse.reddeer.swt.impl.button.PushButton in project jbosstools-openshift by jbosstools.
the class ServerSettingsWizardPage method importProject.
public ImportApplicationWizard importProject() {
new DefaultShell(OpenShiftLabel.Shell.SERVER_ADAPTER_SETTINGS);
new PushButton("Import...").click();
new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.IMPORT_APPLICATION));
return new ImportApplicationWizard();
}
use of org.eclipse.reddeer.swt.impl.button.PushButton in project jbosstools-openshift by jbosstools.
the class OpenShift3ConnectionWizard method finishAndHandleCertificate.
public void finishAndHandleCertificate() {
new WaitUntil(new ControlIsEnabled(new FinishButton()), TimePeriod.LONG);
new FinishButton().click();
try {
new DefaultShell(OpenShiftLabel.Shell.UNTRUSTED_SSL_CERTIFICATE);
new PushButton("Yes").click();
} catch (RedDeerException ex) {
fail("Aceptance of SSL certificate failed.");
}
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.NEW_CONNECTION), TimePeriod.LONG);
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
}
use of org.eclipse.reddeer.swt.impl.button.PushButton in project jbosstools-openshift by jbosstools.
the class EnvironmentVariableWizardPage method removeEnvironmentVariable.
/**
* Removes environment.
*
* @param envVar environment variable to remove
* @return true if variable was removed successfully, false otherwise
*/
public boolean removeEnvironmentVariable(EnvVar envVar) {
DefaultTable table = new DefaultTable();
table.select(envVar.getName());
new PushButton(OpenShiftLabel.Button.REMOVE_BASIC).click();
new DefaultShell(OpenShiftLabel.Shell.REMOVE_ENV_VAR);
new YesButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.REMOVE_ENV_VAR));
return !(table.containsItem(envVar.getName(), 0) && table.containsItem(envVar.getValue(), 1));
}
Aggregations