use of org.eclipse.reddeer.swt.impl.button.CheckBox in project jbosstools-openshift by jbosstools.
the class DebuggingEAPAppTest method rebuildProject.
private static void rebuildProject() {
PackageExplorerPart pexplorer = new PackageExplorerPart();
pexplorer.open();
pexplorer.getProject(PROJECT_NAME).select();
new ContextMenuItem("Maven", "Update Project...").select();
new WaitUntil(new ShellIsAvailable("Update Maven Project"), TimePeriod.LONG);
new CheckBox("Force Update of Snapshots/Releases").toggle(true);
new PushButton("OK").click();
new WaitWhile(new ShellIsAvailable("Update Maven Project"), TimePeriod.DEFAULT);
new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG);
}
use of org.eclipse.reddeer.swt.impl.button.CheckBox in project jbosstools-openshift by jbosstools.
the class CreateApplicationFromTemplateTest method importApplicationAndVerify.
public static void importApplicationAndVerify(String projectName) {
new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.IMPORT_APPLICATION));
new DefaultShell(OpenShiftLabel.Shell.IMPORT_APPLICATION);
try {
new CheckBox(new WithTextMatcher(new StringStartsWith("Do not clone"))).toggle(true);
} catch (CoreLayerException ex) {
// git directory is not in use
} catch (WaitTimeoutExpiredException ex) {
// swallow, checkbox is disabled
}
new FinishButton().click();
ProjectExplorer projectExplorer = new ProjectExplorer();
projectExplorer.open();
OpenShiftUtils.handleCheatSheetCreateServerAdapter();
new WaitUntil(new ProjectExists(projectName, new ProjectExplorer()), TimePeriod.LONG, false);
assertTrue("Project Explorer should contain imported project " + projectName, projectExplorer.containsProject(projectName));
}
use of org.eclipse.reddeer.swt.impl.button.CheckBox 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.CheckBox 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.CheckBox in project jbosstools-openshift by jbosstools.
the class PortForwardingTest method testFreePortsForPortForwarding.
@Test
public void testFreePortsForPortForwarding() {
openPortForwardingDialog();
CheckBox checkBox = new CheckBox(OpenShiftLabel.TextLabels.FIND_FREE_PORTS);
Table table = new DefaultTable();
assertTrue("Default port should be used for ping on first opening of Port forwarding dialog.", table.getItem("ping").getText(1).equals("8888"));
assertTrue("Default port should be used for http on first opening of Port forwarding dialog.", table.getItem("http").getText(1).equals("8080"));
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
checkBox.click();
assertFalse("Free port port should be used for ping at this point.", table.getItem("ping").getText(1).equals("8888"));
assertFalse("Free port should be used for http at this point.", table.getItem("http").getText(1).equals("8080"));
checkBox.click();
assertTrue("Default port should be used for ping at this point.", table.getItem("ping").getText(1).equals("8888"));
assertTrue("Default port should be used for http at this point.", table.getItem("http").getText(1).equals("8080"));
}
Aggregations