Search in sources :

Example 1 with CDK3ServerEditor

use of org.jboss.tools.cdk.reddeer.server.ui.editor.CDK3ServerEditor in project jbosstools-openshift by jbosstools.

the class CDK3ServerEditorTest method setServerEditor.

public void setServerEditor() {
    serversView = new CDKServersView();
    serversView.open();
    serversView.getServer(getServerAdapter()).open();
    editor = new CDK3ServerEditor(getServerAdapter());
    editor.activate();
    new WaitUntil(new JobIsRunning(), TimePeriod.getCustom(1), false);
}
Also used : CDK3ServerEditor(org.jboss.tools.cdk.reddeer.server.ui.editor.CDK3ServerEditor) CDKServersView(org.jboss.tools.cdk.reddeer.server.ui.CDKServersView) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning) SystemJobIsRunning(org.jboss.tools.cdk.reddeer.core.condition.SystemJobIsRunning) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil)

Example 2 with CDK3ServerEditor

use of org.jboss.tools.cdk.reddeer.server.ui.editor.CDK3ServerEditor 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;
        }
    }
}
Also used : SystemJobIsRunning(org.jboss.tools.cdk.reddeer.core.condition.SystemJobIsRunning) WorkbenchLayerException(org.eclipse.reddeer.workbench.exception.WorkbenchLayerException) CDK3ServerEditor(org.jboss.tools.cdk.reddeer.server.ui.editor.CDK3ServerEditor) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) EditorIsDirty(org.eclipse.reddeer.workbench.condition.EditorIsDirty) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil)

Aggregations

WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)2 SystemJobIsRunning (org.jboss.tools.cdk.reddeer.core.condition.SystemJobIsRunning)2 CDK3ServerEditor (org.jboss.tools.cdk.reddeer.server.ui.editor.CDK3ServerEditor)2 WaitWhile (org.eclipse.reddeer.common.wait.WaitWhile)1 EditorIsDirty (org.eclipse.reddeer.workbench.condition.EditorIsDirty)1 JobIsRunning (org.eclipse.reddeer.workbench.core.condition.JobIsRunning)1 WorkbenchLayerException (org.eclipse.reddeer.workbench.exception.WorkbenchLayerException)1 CDKServersView (org.jboss.tools.cdk.reddeer.server.ui.CDKServersView)1