use of org.eclipse.reddeer.swt.impl.button.CheckBox in project jbosstools-openshift by jbosstools.
the class ServerAdapterFromResourceTest method importProject.
@BeforeClass
public static void importProject() {
explorer = new OpenShiftExplorerView();
explorer.open();
project = explorer.getOpenShift3Connection(connectionReq.getConnection()).getProject(DatastoreOS3.TEST_PROJECT);
project.getServicesWithName(OpenShiftResources.NODEJS_SERVICE).get(0).select();
new ContextMenuItem(OpenShiftLabel.ContextMenu.IMPORT_APPLICATION).select();
new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.IMPORT_APPLICATION));
ImportApplicationWizard appWizard = new ImportApplicationWizard();
try {
CheckBox checkBox = new CheckBox("Do not clone - use existing repository");
if (checkBox.isEnabled()) {
checkBox.toggle(true);
LOGGER.debug("Using existing project, skipping import");
}
} catch (RedDeerException ex) {
LOGGER.debug("No existing project found, importing");
}
try {
appWizard.finish();
} catch (WaitTimeoutExpiredException ex) {
// When running test in suite, it needs to be selected correct build config(in OpenShift instance could be more build configs)
appWizard.selectExistingBuildConfiguration(OpenShiftResources.NODEJS_APP_DEPLOYMENT_CONFIG);
appWizard.finish();
}
new WaitUntil(new OpenShiftResourceExists(Resource.DEPLOYMENT, OpenShiftResources.NODEJS_APP_REPLICATION_CONTROLLER, ResourceState.UNSPECIFIED, DatastoreOS3.TEST_PROJECT, connectionReq.getConnection()), TimePeriod.LONG);
}
use of org.eclipse.reddeer.swt.impl.button.CheckBox in project jbosstools-openshift by jbosstools.
the class ServerAdapterWizardHandlingTest method testPodPathWidgetAccessibility.
@Test
public void testPodPathWidgetAccessibility() {
openNewServerAdapterWizard();
next();
new PushButton(OpenShiftLabel.Button.ADVANCED_OPEN).click();
new CheckBox("Use inferred Pod Deployment Path").toggle(false);
LabeledText podPath = new LabeledText("Pod Deployment Path: ");
String podDeploymentPath = "/opt/eap/standalone/deployments/";
podPath.setText("");
assertFalse("Next button should be disable if pod path is empty is selected.", nextButtonIsEnabled());
podPath.setText(podDeploymentPath);
assertTrue("Next button should be reeenabled if pod path is correctly filled in.", nextButtonIsEnabled());
}
use of org.eclipse.reddeer.swt.impl.button.CheckBox in project jbosstools-openshift by jbosstools.
the class StoreConnectionTest method secureStorageDisabledJBIDE19604Test.
@Test
public void secureStorageDisabledJBIDE19604Test() {
deleteSecureStorage();
invokeNewAppWizardFromCentral();
new CheckBox(OpenShiftLabel.TextLabels.STORE_PASSWORD).toggle(true);
new NextButton().click();
// Cancel secure storage shell
try {
new DefaultShell(OpenShiftLabel.Shell.SECURE_STORAGE_PASSWORD);
} catch (CoreLayerException ex) {
new DefaultShell(OpenShiftLabel.Shell.SECURE_STORAGE);
}
new CancelButton().click();
// Cancel warning shell
new DefaultShell("Warning");
new OkButton().click();
new CheckBox(OpenShiftLabel.TextLabels.STORE_PASSWORD).toggle(false);
// Next button should work
new NextButton().click();
AbstractWaitCondition backButtonIsEnabled = new AbstractWaitCondition() {
@Override
public boolean test() {
return new BackButton().isEnabled();
}
};
new WaitUntil(backButtonIsEnabled);
new CancelButton().click();
}
use of org.eclipse.reddeer.swt.impl.button.CheckBox in project jbosstools-openshift by jbosstools.
the class OpenShiftExplorerView method connectToOpenShift.
public void connectToOpenShift(String server, String username, String password, boolean storePassword, boolean useDefaultServer, AuthenticationMethod authMethod, boolean certificateShown) {
new DefaultShell(OpenShiftLabel.Shell.NEW_CONNECTION);
if (new CheckBox(0).isChecked() != useDefaultServer) {
new CheckBox(0).click();
}
if (!useDefaultServer) {
new LabeledCombo(OpenShiftLabel.TextLabels.SERVER).setText(server);
}
new LabeledCombo(OpenShiftLabel.TextLabels.PROTOCOL).setSelection(authMethod.toString());
if (AuthenticationMethod.OAUTH.equals(authMethod)) {
new LabeledText(OpenShiftLabel.TextLabels.TOKEN).setText(password);
}
if (AuthenticationMethod.BASIC.equals(authMethod)) {
new LabeledText(OpenShiftLabel.TextLabels.USERNAME).setText(username);
new LabeledText(OpenShiftLabel.TextLabels.PASSWORD).setText(password);
if (new CheckBox(OpenShiftLabel.TextLabels.STORE_PASSWORD).isChecked() != storePassword) {
new CheckBox(OpenShiftLabel.TextLabels.STORE_PASSWORD).click();
}
}
new WaitUntil(new ControlIsEnabled(new FinishButton()), TimePeriod.DEFAULT);
new FinishButton().click();
if (certificateShown) {
try {
new DefaultShell(OpenShiftLabel.Shell.UNTRUSTED_SSL_CERTIFICATE);
new PushButton("Yes").click();
} catch (RedDeerException ex) {
fail("Aceptance of SSL certificate failed.");
}
}
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.NEW_CONNECTION), TimePeriod.LONG);
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
}
use of org.eclipse.reddeer.swt.impl.button.CheckBox in project jbosstools-openshift by jbosstools.
the class GitCloningWizardPage method useExistingRepository.
public void useExistingRepository(boolean useExistingRepository) {
CheckBox useExistingRepositoryCheckBox = new CheckBox(new DefaultGroup("Clone destination"), "Do not clone - use existing repository");
useExistingRepositoryCheckBox.toggle(useExistingRepository);
}
Aggregations