use of org.eclipse.reddeer.swt.impl.button.FinishButton in project jbosstools-openshift by jbosstools.
the class CDKServerAdapterAbstractTest method addNewCDK3Server.
/**
* Creates new CDK 3.x server adapter via ServersView -> New -> Server
*
* @param serverAdapter server adapter name
* @param hypervisor hypervisor to use
* @param path path to minishift binary file
*/
public static void addNewCDK3Server(String serverAdapter, String hypervisor, String path) {
NewCDKServerWizard dialog = setupFirstNewServerWizardPage(CDK3_SERVER_NAME, serverAdapter);
// set second new server dialog page
NewCDK3ServerWizardPage containerPage = new NewCDK3ServerWizardPage();
containerPage.setCredentials(USERNAME, PASSWORD);
if (hypervisor != null && !hypervisor.isEmpty()) {
// $NON-NLS-1$
log.info("Setting hypervisor to " + hypervisor);
containerPage.setHypervisor(hypervisor);
}
// $NON-NLS-1$
log.info("Setting minishift binary file folder to " + path);
containerPage.setMinishiftBinary(path);
new WaitUntil(new ControlIsEnabled(new FinishButton()), TimePeriod.DEFAULT);
// $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();
}
use of org.eclipse.reddeer.swt.impl.button.FinishButton 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();
}
use of org.eclipse.reddeer.swt.impl.button.FinishButton in project jbosstools-openshift by jbosstools.
the class BuilderImageApplicationWizardHandlingTest method validateGitRepoURL.
private void validateGitRepoURL(String url) {
new LabeledText(OpenShiftLabel.TextLabels.GIT_REPO_URL).setText(url);
assertFalse("Next button should be disabled if git repo URL is invalid", new NextButton().isEnabled());
assertFalse("Finish button should be disabled if git repo URL is invalid", new FinishButton().isEnabled());
}
use of org.eclipse.reddeer.swt.impl.button.FinishButton in project jbosstools-openshift by jbosstools.
the class BuilderImageApplicationWizardHandlingTest method selectBuilderImageAndAssertButtonsAvailability.
private void selectBuilderImageAndAssertButtonsAvailability() {
new DefaultTreeItem(BUILDER_IMAGE).select();
assertTrue("Next button should be enabled if EAP builder image is selected.", new NextButton().isEnabled());
assertFalse("Finish button should be disabled on first wizard page for builder images.", new FinishButton().isEnabled());
}
use of org.eclipse.reddeer.swt.impl.button.FinishButton in project jbosstools-openshift by jbosstools.
the class BuilderImageApplicationWizardHandlingTest method setDefaultValuesAndAssert.
private void setDefaultValuesAndAssert(String defaultRepo, String defaultRef, String defaultContextDir) {
new LabeledText(OpenShiftLabel.TextLabels.GIT_REPO_URL).setText(defaultRepo);
new LabeledText(OpenShiftLabel.TextLabels.GIT_REF).setText(defaultRef);
new LabeledText(OpenShiftLabel.TextLabels.CONTEXT_DIR).setText(defaultContextDir);
assertTrue("Next button should be enabled after setting git values to default.", new NextButton().isEnabled());
assertTrue("Finish button should be enabled after setting git values to default.", new FinishButton().isEnabled());
}
Aggregations