use of org.eclipse.reddeer.swt.impl.button.FinishButton 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.FinishButton in project jbosstools-openshift by jbosstools.
the class SecureStorage method triggerSecureStorageOfPasswordInConnectionDialog.
/**
* Triggers secure storage of password.
*
* @param username
* user name
* @param server
* server
* @param storePassword
* store password if value is set to true, remove password if value
* is set to false
* @param serverType
* type of a server
*/
private static void triggerSecureStorageOfPasswordInConnectionDialog(String username, String server, boolean storePassword) {
OpenShiftExplorerView explorer = new OpenShiftExplorerView();
AbstractOpenShiftConnection connection = explorer.getOpenShiftConnection(username, server);
connection.select();
new ContextMenuItem(OpenShiftLabel.ContextMenu.EDIT_CONNECTION).select();
new DefaultShell(OpenShiftLabel.Shell.EDIT_CONNECTION);
// Store password if it is not stored
if (!(new CheckBox(1).isChecked()) && storePassword) {
new CheckBox(1).click();
new FinishButton().click();
TestUtils.acceptSSLCertificate();
handleSecureStoragePasswordAndHint(SystemProperties.SECURE_STORAGE_PASSWORD);
// Remove password if it is stored
} else if (new CheckBox(1).isChecked() && !storePassword) {
new CheckBox(1).click();
new FinishButton().click();
}
new WaitWhile(new JobIsRunning());
}
use of org.eclipse.reddeer.swt.impl.button.FinishButton in project jbosstools-openshift by jbosstools.
the class Service method createServerAdapter.
/**
* Creates server adapter for this service with default values.
*/
public void createServerAdapter() {
select();
new ContextMenuItem(OpenShiftLabel.ContextMenu.NEW_ADAPTER_FROM_EXPLORER).select();
new DefaultShell(OpenShiftLabel.Shell.SERVER_ADAPTER_SETTINGS);
new FinishButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.SERVER_ADAPTER_SETTINGS));
new WaitUntil(new JobIsKilled("Refreshing server adapter list"), TimePeriod.LONG, false);
new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG);
}
use of org.eclipse.reddeer.swt.impl.button.FinishButton 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.FinishButton 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