use of org.eclipse.reddeer.swt.impl.button.YesButton in project jbosstools-openshift by jbosstools.
the class TestUtils method acceptSSLCertificate.
public static void acceptSSLCertificate() {
try {
new DefaultShell(OpenShiftLabel.Shell.UNTRUSTED_SSL_CERTIFICATE);
new YesButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.UNTRUSTED_SSL_CERTIFICATE));
} catch (RedDeerException ex) {
// no dialog was presented
}
}
use of org.eclipse.reddeer.swt.impl.button.YesButton in project jbosstools-openshift by jbosstools.
the class ScalingTest method scaleTo0ShouldWarn.
@Test
public void scaleTo0ShouldWarn() {
int pods = requiredService.getReplicationController().getCurrentReplicaCount();
new WaitUntil(new PodsAreDeployed(project, OpenShiftResources.NODEJS_APP_REPLICATION_CONTROLLER, pods), TimePeriod.LONG);
OpenShiftResource replicationController = project.getOpenShiftResource(Resource.DEPLOYMENT, OpenShiftResources.NODEJS_APP_REPLICATION_CONTROLLER);
replicationController.select();
scaleTo(0);
new DefaultShell(OpenShiftLabel.Shell.STOP_ALL_DEPLOYMENTS).setFocus();
new YesButton().click();
assertPodAmountDesiredEqualsCurrent(0, project);
}
use of org.eclipse.reddeer.swt.impl.button.YesButton 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));
}
use of org.eclipse.reddeer.swt.impl.button.YesButton in project linuxtools by eclipse.
the class RunDockerImageLaunchConfiguration method deleteRunConfiguration.
public void deleteRunConfiguration(String configuratioName) {
selectConfiguration(configuratioName);
new DefaultToolItem(DELETE_LAUNCH_CONFIGURATION_LABEL).click();
Shell deleteShell = new DefaultShell("Confirm Launch Configuration Deletion");
WidgetIsFound deleteButton = new WidgetIsFound(org.eclipse.swt.widgets.Button.class, deleteShell.getSWTWidget(), new WithMnemonicTextMatcher("Delete"));
Button button;
if (deleteButton.test()) {
// photon changed button text
button = new PushButton(deleteShell, "Delete");
} else {
button = new YesButton(deleteShell);
}
button.click();
new WaitWhile(new ShellIsAvailable(deleteShell));
new WaitUntil(new ShellIsAvailable("Run Configurations"));
}
use of org.eclipse.reddeer.swt.impl.button.YesButton 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