use of org.eclipse.reddeer.swt.impl.button.NextButton in project jbosstools-openshift by jbosstools.
the class BuilderImageApplicationWizardHandlingTest method next.
private static void next() {
new NextButton().click();
new WaitUntil(new ControlIsEnabled(new BackButton()));
}
use of org.eclipse.reddeer.swt.impl.button.NextButton in project jbosstools-openshift by jbosstools.
the class BuilderImageApplicationWizardHandlingTest method validateValidResourceName.
private void validateValidResourceName(String name) {
new LabeledText(OpenShiftLabel.TextLabels.BUILDER_RESOURCE_NAME).setText(name);
assertTrue("Next button should be enabled if resource name is valid '" + name + "'", new NextButton().isEnabled());
assertTrue("Finish button should be enabled if resource name is valid '" + name + "'", new FinishButton().isEnabled());
}
use of org.eclipse.reddeer.swt.impl.button.NextButton in project jbosstools-openshift by jbosstools.
the class DeployDockerImageTest method proceedThroughDeployImageToOpenShiftWizard.
/**
* Proceeds through the image if the first wizard page has correct details -
* connection, project and image name.
*/
private void proceedThroughDeployImageToOpenShiftWizard() {
new WaitUntil(new ControlIsEnabled(new NextButton()), TimePeriod.DEFAULT, false);
assertTrue("Next button should be enabled if all details are set correctly", new NextButton().isEnabled());
new NextButton().click();
new WaitUntil(new ControlIsEnabled(new BackButton()), TimePeriod.LONG);
new NextButton().click();
if (!new CheckBox("Add Route").isChecked()) {
new CheckBox("Add Route").click();
}
new FinishButton().click();
new ShellWithButton("Deploy Image to OpenShift", "OK");
new OkButton().click();
new WaitWhile(new ShellIsAvailable("Deploy Image to OpenShift"), TimePeriod.LONG);
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
}
use of org.eclipse.reddeer.swt.impl.button.NextButton in project jbosstools-openshift by jbosstools.
the class BuilderImageApplicationWizardHandlingTest method testGitFieldsValidationOnBuildConfigurationWizardPage.
@Test
public void testGitFieldsValidationOnBuildConfigurationWizardPage() {
nextToBuildConfigurationWizardPage();
LabeledText gitRepo = new LabeledText(OpenShiftLabel.TextLabels.GIT_REPO_URL);
LabeledText gitReference = new LabeledText(OpenShiftLabel.TextLabels.GIT_REF);
LabeledText contextDirectory = new LabeledText(OpenShiftLabel.TextLabels.CONTEXT_DIR);
String defaultRepo = gitRepo.getText();
String defaultRef = gitReference.getText();
String defaultContextDir = contextDirectory.getText();
validateGitRepoURL("invalid");
validateGitRepoURL("");
setDefaultValuesAndAssert(defaultRepo, defaultRef, defaultContextDir);
gitReference.setText("");
contextDirectory.setText("");
assertTrue("Next button should be enabled if ref and context dir are empty.", new NextButton().isEnabled());
assertTrue("Finish button should be enabled if ref and context dir are empty.", new FinishButton().isEnabled());
setDefaultValuesAndAssert(defaultRepo, defaultRef, defaultContextDir);
validateGitReference("invalid reference");
validateGitReference("invalidad*reference");
validateGitReference("invalid:reference");
validateGitReference("@");
validateGitReference("invalid\reference");
setDefaultValuesAndAssert(defaultRepo, defaultRef, defaultContextDir);
}
use of org.eclipse.reddeer.swt.impl.button.NextButton in project jbosstools-openshift by jbosstools.
the class BuilderImageApplicationWizardHandlingTest method validateGitReference.
private void validateGitReference(String ref) {
new LabeledText(OpenShiftLabel.TextLabels.GIT_REF).setText(ref);
assertFalse("Next button should be disabled if git reference is invalid", new NextButton().isEnabled());
assertFalse("Finish button should be disabled if git reference is invalid", new FinishButton().isEnabled());
}
Aggregations