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();
}
Aggregations