use of org.eclipse.reddeer.workbench.exception.WorkbenchLayerException in project jbosstools-openshift by jbosstools.
the class CDKServerAdapterAbstractTest method passCredentialsIntoEnvironment.
protected void passCredentialsIntoEnvironment(boolean pass) {
getCDKServer().open();
CDK3ServerEditor editor = new CDK3ServerEditor(getCDKServer().getLabel().getName());
editor.getPassCredentialsCheckBox().toggle(pass);
new WaitUntil(new EditorIsDirty(editor), TimePeriod.MEDIUM, false);
new WaitWhile(new SystemJobIsRunning(getJobMatcher(MINISHIFT_VALIDATION_JOB)), TimePeriod.MEDIUM);
try {
editor.save();
} catch (WorkbenchLayerException exc) {
String message = exc.getMessage().toLowerCase();
if (message.contains("save") && message.contains("not enabled")) {
log.info("There was nothing to save");
} else {
throw exc;
}
}
}
Aggregations