use of org.eclipse.reddeer.swt.condition.ControlIsEnabled in project jbosstools-openshift by jbosstools.
the class OpenShiftExplorerView method connectToOpenShift.
public void connectToOpenShift(String server, String username, String password, boolean storePassword, boolean useDefaultServer, AuthenticationMethod authMethod, boolean certificateShown) {
new DefaultShell(OpenShiftLabel.Shell.NEW_CONNECTION);
if (new CheckBox(0).isChecked() != useDefaultServer) {
new CheckBox(0).click();
}
if (!useDefaultServer) {
new LabeledCombo(OpenShiftLabel.TextLabels.SERVER).setText(server);
}
new LabeledCombo(OpenShiftLabel.TextLabels.PROTOCOL).setSelection(authMethod.toString());
if (AuthenticationMethod.OAUTH.equals(authMethod)) {
new LabeledText(OpenShiftLabel.TextLabels.TOKEN).setText(password);
}
if (AuthenticationMethod.BASIC.equals(authMethod)) {
new LabeledText(OpenShiftLabel.TextLabels.USERNAME).setText(username);
new LabeledText(OpenShiftLabel.TextLabels.PASSWORD).setText(password);
if (new CheckBox(OpenShiftLabel.TextLabels.STORE_PASSWORD).isChecked() != storePassword) {
new CheckBox(OpenShiftLabel.TextLabels.STORE_PASSWORD).click();
}
}
new WaitUntil(new ControlIsEnabled(new FinishButton()), TimePeriod.DEFAULT);
new FinishButton().click();
if (certificateShown) {
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.condition.ControlIsEnabled in project jbosstools-openshift by jbosstools.
the class AbstractOpenShiftApplicationWizard method back.
/**
* Waits and clicks Back button.
*/
public void back() {
new WaitUntil(new ControlIsEnabled(new BackButton()), TimePeriod.LONG);
new BackButton().click();
}
use of org.eclipse.reddeer.swt.condition.ControlIsEnabled in project jbosstools-hibernate by jbosstools.
the class JpaFacetInstallPage method setConnectionProfile.
/**
* Sets connection profile for JPA
* @param profileName given connection profile
*/
public void setConnectionProfile(String profileName) {
DefaultGroup group = new DefaultGroup(referencedComposite, "Connection");
new WaitUntil(new ControlIsEnabled(new DefaultCombo(group)));
new DefaultCombo(group).setSelection(profileName);
PushButton apply = new PushButton(referencedComposite, "Apply");
apply.click();
new WaitWhile(new JobIsRunning());
new WaitWhile(new ShellIsAvailable("Progress Information"), TimePeriod.LONG);
}
use of org.eclipse.reddeer.swt.condition.ControlIsEnabled in project jbosstools-hibernate by jbosstools.
the class ProjectConfigurationFactory method convertProjectToFacetsForm.
/**
* Convert project to facet form
* @param prj given project name
*/
public static void convertProjectToFacetsForm(String prj) {
ProjectExplorer pe = new ProjectExplorer();
pe.open();
PropertyDialog pd = pe.getProject(prj).openProperties();
pd.select("Project Facets");
// convert to faceted form
new DefaultTreeItem("Project Facets").select();
new DefaultLink("Convert to faceted form...").click();
new WaitWhile(new JobIsRunning());
new WaitUntil(new WidgetIsFound(Button.class, new WithStyleMatcher(SWT.PUSH), new WithMnemonicTextMatcher("Apply")), TimePeriod.LONG);
PushButton apply = new PushButton("Apply");
new WaitUntil(new ControlIsEnabled(apply));
apply.click();
pd.ok();
}
Aggregations