Search in sources :

Example 11 with NewCDKServerWizard

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

the class CDKServerAdapterAbstractTest method addNewCDKServer.

/**
 * Creates new CDK 2.x server adapter via ServersView -> New -> Server
 *
 * @param serverAdapter server adapter name
 * @param path path to vagrantfile
 */
public static void addNewCDKServer(String serverAdapter, String path) {
    NewCDKServerWizard dialog = setupFirstNewServerWizardPage(CDK_SERVER_NAME, serverAdapter);
    // set second new server dialog page
    NewCDKServerWizardPage containerPage = new NewCDKServerWizardPage();
    containerPage.setCredentials(USERNAME, PASSWORD);
    // set cdk 2.x fields
    // $NON-NLS-1$
    log.info("Setting vagrant file folder");
    containerPage.setFolder(path);
    new WaitUntil(new ControlIsEnabled(new FinishButton()), TimePeriod.MEDIUM);
    // $NON-NLS-1$
    log.info("Finishing Add new server dialog");
    if (!(new FinishButton().isEnabled())) {
        // $NON-NLS-1$
        log.error("Finish button was not enabled");
    }
    dialog.finish();
}
Also used : FinishButton(org.eclipse.reddeer.swt.impl.button.FinishButton) NewCDKServerWizardPage(org.jboss.tools.cdk.reddeer.server.ui.wizard.NewCDKServerWizardPage) ControlIsEnabled(org.eclipse.reddeer.swt.condition.ControlIsEnabled) NewCDKServerWizard(org.jboss.tools.cdk.reddeer.server.ui.wizard.NewCDKServerWizard) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil)

Aggregations

NewCDKServerWizard (org.jboss.tools.cdk.reddeer.server.ui.wizard.NewCDKServerWizard)11 WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)9 ControlIsEnabled (org.eclipse.reddeer.swt.condition.ControlIsEnabled)9 FinishButton (org.eclipse.reddeer.swt.impl.button.FinishButton)8 NewServerWizardPage (org.eclipse.reddeer.eclipse.wst.server.ui.wizard.NewServerWizardPage)4 Test (org.junit.Test)3 WaitWhile (org.eclipse.reddeer.common.wait.WaitWhile)2 CancelButton (org.eclipse.reddeer.swt.impl.button.CancelButton)2 JobIsRunning (org.eclipse.reddeer.workbench.core.condition.JobIsRunning)2 NewCDK32ServerWizardPage (org.jboss.tools.cdk.reddeer.server.ui.wizard.NewCDK32ServerWizardPage)2 NewCDK3ServerWizardPage (org.jboss.tools.cdk.reddeer.server.ui.wizard.NewCDK3ServerWizardPage)2 NewMinishiftServerWizardPage (org.jboss.tools.cdk.reddeer.server.ui.wizard.NewMinishiftServerWizardPage)2 RedDeerException (org.eclipse.reddeer.common.exception.RedDeerException)1 WaitTimeoutExpiredException (org.eclipse.reddeer.common.exception.WaitTimeoutExpiredException)1 CoreLayerException (org.eclipse.reddeer.core.exception.CoreLayerException)1 TreeItem (org.eclipse.reddeer.swt.api.TreeItem)1 NextButton (org.eclipse.reddeer.swt.impl.button.NextButton)1 DefaultShell (org.eclipse.reddeer.swt.impl.shell.DefaultShell)1 LabeledText (org.eclipse.reddeer.swt.impl.text.LabeledText)1 DefaultTreeItem (org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem)1