use of org.eclipse.reddeer.swt.impl.button.NextButton in project jbosstools-openshift by jbosstools.
the class CreateApplicationFromTemplateTest method completeWizardAndVerify.
private void completeWizardAndVerify() {
new WaitUntil(new ControlIsEnabled(new NextButton()), TimePeriod.DEFAULT);
new NextButton().click();
new WaitUntil(new ControlIsEnabled(new BackButton()), TimePeriod.LONG);
String srcRepoRef = new DefaultTable().getItem(TemplateParametersTest.SOURCE_REPOSITORY_REF).getText(1);
srcRepoURI = new DefaultTable().getItem(TemplateParametersTest.SOURCE_REPOSITORY_URL).getText(1);
String contextDir = new DefaultTable().getItem(TemplateParametersTest.CONTEXT_DIR).getText(1);
applicationName = new DefaultTable().getItem(TemplateParametersTest.APPLICATION_NAME).getText(1);
new NextButton().click();
new WaitWhile(new ControlIsEnabled(new NextButton()), TimePeriod.LONG);
new FinishButton().click();
new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.APPLICATION_SUMMARY), TimePeriod.LONG);
new DefaultShell(OpenShiftLabel.Shell.APPLICATION_SUMMARY);
assertTrue(TemplateParametersTest.SOURCE_REPOSITORY_REF + " is not same as the one shown in " + "New OpenShift Application wizard.", new DefaultTable().getItem(TemplateParametersTest.SOURCE_REPOSITORY_REF).getText(1).equals(srcRepoRef));
assertTrue(TemplateParametersTest.SOURCE_REPOSITORY_URL.split(" ")[0] + " is not same as the one shown in " + "New OpenShift Application wizard.", new DefaultTable().getItem(TemplateParametersTest.SOURCE_REPOSITORY_URL.split(" ")[0]).getText(1).equals(srcRepoURI));
assertTrue(TemplateParametersTest.CONTEXT_DIR + " is not same as the one shown in New OpenShift" + " Application wizard.", new DefaultTable().getItem(TemplateParametersTest.CONTEXT_DIR).getText(1).equals(contextDir));
assertTrue(TemplateParametersTest.APPLICATION_NAME.split(" ")[0] + " is not same as the one shown in " + "New OpenShift Application wizard.", new DefaultTable().getItem(TemplateParametersTest.APPLICATION_NAME.split(" ")[0]).getText(1).equals(applicationName));
assertFalse(TemplateParametersTest.GENERIC_SECRET.split(" ")[0] + " should be generated and non-empty.", new DefaultTable().getItem(TemplateParametersTest.GENERIC_SECRET.split(" ")[0]).getText(1).isEmpty());
assertFalse(TemplateParametersTest.GITHUB_SECRET.split(" ")[0] + " should be generated and non-empty.", new DefaultTable().getItem(TemplateParametersTest.GITHUB_SECRET.split(" ")[0]).getText(1).isEmpty());
new DefaultLink("Click here to display the webhooks available to automatically trigger builds.").click();
new DefaultShell(OpenShiftLabel.Shell.WEBHOOK_TRIGGERS);
genericWebhookURL = new DefaultText(0).getText();
githubWebhookURL = new DefaultText(1).getText();
assertFalse("Generic webhook URL should not be empty.", genericWebhookURL.isEmpty());
assertFalse("GitHub webhook URL should not be empty.", githubWebhookURL.isEmpty());
new OkButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.WEBHOOK_TRIGGERS));
new DefaultShell(OpenShiftLabel.Shell.APPLICATION_SUMMARY);
new OkButton().click();
}
use of org.eclipse.reddeer.swt.impl.button.NextButton in project jbosstools-openshift by jbosstools.
the class CreateApplicationOnBuilderImageTest method validateJBIDE22704.
private void validateJBIDE22704() {
BuilderImageApplicationWizardHandlingTest.nextToBuildConfigurationWizardPage();
applicationName = new LabeledText("Name: ").getText();
assertNotNull(applicationName);
assertTrue(applicationName.length() > 0);
String gitUrl = new LabeledText("Git Repository URL:").getText();
assertNotNull(gitUrl);
if (gitUrl.length() < 1) {
new CancelButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.NEW_APP_WIZARD));
throw new OpenshiftTestInFailureException("JBIDE-23704 should be fixed now.");
}
new WaitUntil(new ControlIsEnabled(new NextButton()));
/*
* switch to the Deployment page
*/
new NextButton().click();
new WaitUntil(new ControlIsEnabled(new BackButton()));
int numberofEnvironmentVariables = new DefaultTable().rowCount();
assertTrue(numberofEnvironmentVariables > 0);
/*
* switch to the Routing page
*/
new NextButton().click();
new WaitUntil(new ControlIsEnabled(new BackButton()));
int numberOfServicePorts = new DefaultTable().rowCount();
assertTrue(numberOfServicePorts > 0);
new CancelButton().click();
new WaitWhile(new JobIsRunning(), TimePeriod.getCustom(120));
}
use of org.eclipse.reddeer.swt.impl.button.NextButton in project jbosstools-openshift by jbosstools.
the class TemplatesCreator method createOpenShiftApplicationBasedOnTemplate.
private void createOpenShiftApplicationBasedOnTemplate(boolean importProject, boolean serverTemplate, String templateName, final String templateLocalPath, List<Label> labels, TemplateParameter... parameters) {
if (serverTemplate) {
selectServerTemplate(templateName);
} else {
selectLocalTemplate(templateLocalPath);
}
new WaitUntil(new ControlIsEnabled(new NextButton()), TimePeriod.DEFAULT);
new NextButton().click();
new WaitUntil(new ControlIsEnabled(new BackButton()), TimePeriod.LONG);
if (parameters != null && parameters.length != 0) {
setTemplateParameters(parameters);
}
new NextButton().click();
new WaitWhile(new ControlIsEnabled(new NextButton()), TimePeriod.LONG);
if (labels != null && labels.size() != 0) {
createOpenShiftLabels(labels);
}
new FinishButton().click();
new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.APPLICATION_SUMMARY), TimePeriod.LONG);
new DefaultShell(OpenShiftLabel.Shell.APPLICATION_SUMMARY);
new OkButton().click();
new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.IMPORT_APPLICATION));
executeImport(importProject);
}
use of org.eclipse.reddeer.swt.impl.button.NextButton 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.NextButton 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());
}
Aggregations