Search in sources :

Example 6 with SystemJobIsRunning

use of org.jboss.tools.cdk.reddeer.core.condition.SystemJobIsRunning in project jbosstools-openshift by jbosstools.

the class MinishiftServerEditorTest method setupServerWizardPage.

@Override
protected void setupServerWizardPage(NewMenuWizard dialog) {
    NewServerWizardPage page = new NewServerWizardPage(dialog);
    page.selectType(SERVER_TYPE_GROUP, MINISHIFT_SERVER_NAME);
    page.setName(SERVER_ADAPTER_MINISHIFT);
    dialog.next();
    NewMinishiftServerWizardPage containerPage = new NewMinishiftServerWizardPage();
    log.info("Setting hypervisor to: " + hypervisor);
    containerPage.setHypervisor(hypervisor);
    log.info("Setting binary to " + MINISHIFT_PATH);
    containerPage.setMinishiftBinary(MINISHIFT_PATH);
    new WaitWhile(new SystemJobIsRunning(getJobMatcher(MINISHIFT_VALIDATION_JOB)), TimePeriod.MEDIUM, false);
}
Also used : SystemJobIsRunning(org.jboss.tools.cdk.reddeer.core.condition.SystemJobIsRunning) NewMinishiftServerWizardPage(org.jboss.tools.cdk.reddeer.server.ui.wizard.NewMinishiftServerWizardPage) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) NewServerWizardPage(org.eclipse.reddeer.eclipse.wst.server.ui.wizard.NewServerWizardPage)

Example 7 with SystemJobIsRunning

use of org.jboss.tools.cdk.reddeer.core.condition.SystemJobIsRunning in project jbosstools-openshift by jbosstools.

the class CDK3ServerEditorTest method setupServerWizardPage.

@Override
protected void setupServerWizardPage(NewMenuWizard dialog) {
    NewServerWizardPage page = new NewServerWizardPage(dialog);
    page.selectType(SERVER_TYPE_GROUP, CDK3_SERVER_NAME);
    page.setName(SERVER_ADAPTER_3);
    dialog.next();
    NewCDK3ServerWizardPage containerPage = new NewCDK3ServerWizardPage();
    containerPage.setCredentials(USERNAME, PASSWORD);
    if (StringUtils.isEmptyOrNull(hypervisor)) {
        log.info("Hypervisor parameter has no value or is null, default value will be kept: " + containerPage.getHypervisorCombo().getText());
    } else {
        log.info("Setting hypervisor to: " + hypervisor);
        containerPage.setHypervisor(hypervisor);
    }
    log.info("Setting binary to " + MINISHIFT_PATH);
    containerPage.setMinishiftBinary(MINISHIFT_PATH);
    new WaitWhile(new SystemJobIsRunning(getJobMatcher(MINISHIFT_VALIDATION_JOB)), TimePeriod.MEDIUM, false);
}
Also used : SystemJobIsRunning(org.jboss.tools.cdk.reddeer.core.condition.SystemJobIsRunning) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) NewCDK3ServerWizardPage(org.jboss.tools.cdk.reddeer.server.ui.wizard.NewCDK3ServerWizardPage) NewServerWizardPage(org.eclipse.reddeer.eclipse.wst.server.ui.wizard.NewServerWizardPage)

Example 8 with SystemJobIsRunning

use of org.jboss.tools.cdk.reddeer.core.condition.SystemJobIsRunning in project jbosstools-openshift by jbosstools.

the class CDK32ServerEditorTest method setupServerWizardPage.

@Override
protected void setupServerWizardPage(NewMenuWizard dialog) {
    NewServerWizardPage page = new NewServerWizardPage(dialog);
    page.selectType(SERVER_TYPE_GROUP, CDK32_SERVER_NAME);
    page.setName(getServerAdapter());
    dialog.next();
    NewCDK32ServerWizardPage containerPage = new NewCDK32ServerWizardPage();
    containerPage.setCredentials(USERNAME, PASSWORD);
    log.info("Setting hypervisor to: " + hypervisor);
    containerPage.setHypervisor(hypervisor);
    log.info("Setting binary to " + CDK32_MINISHIFT);
    containerPage.setMinishiftBinary(CDK32_MINISHIFT);
    // here comes possibility to set profile while creating server adapter
    log.info("Setting profile to: ");
    containerPage.setMinishiftProfile("");
    new WaitWhile(new SystemJobIsRunning(getJobMatcher(MINISHIFT_VALIDATION_JOB)), TimePeriod.MEDIUM, false);
}
Also used : NewCDK32ServerWizardPage(org.jboss.tools.cdk.reddeer.server.ui.wizard.NewCDK32ServerWizardPage) SystemJobIsRunning(org.jboss.tools.cdk.reddeer.core.condition.SystemJobIsRunning) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) NewServerWizardPage(org.eclipse.reddeer.eclipse.wst.server.ui.wizard.NewServerWizardPage)

Example 9 with SystemJobIsRunning

use of org.jboss.tools.cdk.reddeer.core.condition.SystemJobIsRunning 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

WaitWhile (org.eclipse.reddeer.common.wait.WaitWhile)9 SystemJobIsRunning (org.jboss.tools.cdk.reddeer.core.condition.SystemJobIsRunning)9 NewServerWizardPage (org.eclipse.reddeer.eclipse.wst.server.ui.wizard.NewServerWizardPage)4 WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)3 NewCDK32ServerWizardPage (org.jboss.tools.cdk.reddeer.server.ui.wizard.NewCDK32ServerWizardPage)2 TimePeriod (org.eclipse.reddeer.common.wait.TimePeriod)1 ServerHasState (org.eclipse.reddeer.eclipse.condition.ServerHasState)1 ServerState (org.eclipse.reddeer.eclipse.wst.server.ui.cnf.ServersViewEnums.ServerState)1 ContextMenuItem (org.eclipse.reddeer.swt.impl.menu.ContextMenuItem)1 LabeledText (org.eclipse.reddeer.swt.impl.text.LabeledText)1 EditorIsDirty (org.eclipse.reddeer.workbench.condition.EditorIsDirty)1 WorkbenchLayerException (org.eclipse.reddeer.workbench.exception.WorkbenchLayerException)1 MultipleWaitConditionHandler (org.jboss.tools.cdk.reddeer.core.condition.MultipleWaitConditionHandler)1 JobMatcher (org.jboss.tools.cdk.reddeer.core.matcher.JobMatcher)1 CDK3ServerEditor (org.jboss.tools.cdk.reddeer.server.ui.editor.CDK3ServerEditor)1 CDKPart (org.jboss.tools.cdk.reddeer.server.ui.editor.CDKPart)1 NewCDK3ServerWizardPage (org.jboss.tools.cdk.reddeer.server.ui.wizard.NewCDK3ServerWizardPage)1 NewMinishiftServerWizardPage (org.jboss.tools.cdk.reddeer.server.ui.wizard.NewMinishiftServerWizardPage)1