Search in sources :

Example 1 with NewCDKServerWizardPage

use of org.jboss.tools.cdk.reddeer.server.ui.wizard.NewCDKServerWizardPage 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

WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)1 ControlIsEnabled (org.eclipse.reddeer.swt.condition.ControlIsEnabled)1 FinishButton (org.eclipse.reddeer.swt.impl.button.FinishButton)1 NewCDKServerWizard (org.jboss.tools.cdk.reddeer.server.ui.wizard.NewCDKServerWizard)1 NewCDKServerWizardPage (org.jboss.tools.cdk.reddeer.server.ui.wizard.NewCDKServerWizardPage)1