use of org.jboss.tools.cdk.reddeer.server.exception.CDKServerException in project jbosstools-openshift by jbosstools.
the class CDKServerEditorAbstractTest method addCDKServer.
public void addCDKServer() {
NewCDKServerWizard dialog = CDKTestUtils.openNewServerWizardDialog();
try {
setupServerWizardPage(dialog);
new WaitUntil(new ControlIsEnabled(new FinishButton()), TimePeriod.MEDIUM, false);
dialog.finish(TimePeriod.MEDIUM);
} catch (RedDeerException coreExc) {
new CancelButton().click();
throw new CDKServerException("Exception occured in CDK server wizard, wizard was canceled", coreExc);
}
}
use of org.jboss.tools.cdk.reddeer.server.exception.CDKServerException in project jbosstools-openshift by jbosstools.
the class CDKServer method confirmSSLCertificateDialog.
/**
* Methods waits for SSL Certificate dialog shell to appear and then confirms dialog,
* it might happen that certificate is already in place and no dialog is shown,
* then WaitTimeoutExpiredException is logged but not raised
*/
private void confirmSSLCertificateDialog(Shell shell) {
try {
DefaultShell certificateDialog = new DefaultShell(shell);
certificateDialog.setFocus();
log.info("SSL Certificate Dialog appeared during " + getLabel().getState().toString());
new PushButton(certificateDialog, "Yes").click();
new WaitWhile(new ShellIsAvailable(certificateDialog));
setCertificateAccepted(true);
} catch (WaitTimeoutExpiredException ex) {
String message = "WaitTimeoutExpiredException occured when handling Certificate dialog. " + "Dialog has not been shown";
log.error(message);
throw new CDKServerException(message, ex);
}
}
use of org.jboss.tools.cdk.reddeer.server.exception.CDKServerException in project jbosstools-openshift by jbosstools.
the class CDKServer method processProblemDialog.
private void processProblemDialog(Shell shell, String excMessage) {
log.info("Processing passed shell dialog " + new DefaultShell(shell).getText());
new WaitUntil(new JobIsRunning(), TimePeriod.MEDIUM, false);
new WaitWhile(new JobIsRunning(), TimePeriod.DEFAULT, false);
DefaultShell shellDialog = new DefaultShell(shell);
log.info("Shell could have changed after getting another error");
log.info("Actual shell dialog name is " + shellDialog.getText());
CDKUtils.captureScreenshot("CDEServer#ProblemDialog#" + shellDialog.getText());
new OkButton(shellDialog).click();
throw new CDKServerException(excMessage);
}
use of org.jboss.tools.cdk.reddeer.server.exception.CDKServerException in project jbosstools-openshift by jbosstools.
the class CDKServer method checkInitialStateChange.
private void checkInitialStateChange(ServerState actualState) {
try {
new WaitUntil(new ServerHasState(this, actualState), TimePeriod.DEFAULT);
String message = "Server's state went back to " + actualState;
throw new CDKServerException(message);
} catch (WaitTimeoutExpiredException exc) {
log.info("Server's state changed to " + this.getLabel().getState() + " and did not go back to " + actualState);
}
}
Aggregations