use of org.eclipse.reddeer.swt.impl.menu.ContextMenuItem in project jbosstools-openshift by jbosstools.
the class DeployDockerImageTest method verifyDeployedHelloWorldDockerImage.
/**
* Verifies whether an application pod has been created and application is running successfully.
*/
private void verifyDeployedHelloWorldDockerImage(String projectName) {
new OpenShiftExplorerView().getOpenShift3Connection(openshiftConnectionRequirement.getConnection()).refresh();
try {
new WaitUntil(new OpenShiftResourceExists(Resource.POD, new StringContains("hello-openshift"), ResourceState.RUNNING, projectName, openshiftConnectionRequirement.getConnection()), TimePeriod.VERY_LONG);
} catch (WaitTimeoutExpiredException ex) {
fail("There should be a running application pod for a deployed docker image, " + "but it does not exist.");
}
new OpenShiftExplorerView().getOpenShift3Connection(openshiftConnectionRequirement.getConnection()).refresh();
new OpenShiftExplorerView().getOpenShift3Connection(openshiftConnectionRequirement.getConnection()).getProject(projectName).getOpenShiftResources(Resource.ROUTE).get(0).select();
new ContextMenuItem(OpenShiftLabel.ContextMenu.SHOW_IN_BROWSER).select();
try {
// getRouteURL("hello-openshift", projectName),
new WaitUntil(new BrowserContainsText("Hello OpenShift!"), TimePeriod.VERY_LONG);
} catch (WaitTimeoutExpiredException ex) {
fail("Browser does not contain hello world content.");
}
}
use of org.eclipse.reddeer.swt.impl.menu.ContextMenuItem in project jbosstools-openshift by jbosstools.
the class OpenShiftProject method delete.
/**
* Deletes OpenShift project.
*/
public void delete() {
item.select();
new ContextMenuItem(OpenShiftLabel.ContextMenu.DELETE_OS_PROJECT).select();
new DefaultShell(OpenShiftLabel.Shell.DELETE_OS_PROJECT);
new OkButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.DELETE_OS_PROJECT), TimePeriod.LONG);
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
}
use of org.eclipse.reddeer.swt.impl.menu.ContextMenuItem in project jbosstools-openshift by jbosstools.
the class OpenShiftProject method openProperties.
/**
* Opens properties for the specified tree item (project, service or pod) in OpenShift explorer.
*/
public void openProperties(TreeItem treeItem) {
activateOpenShiftExplorerView();
select();
new ContextMenuItem(OpenShiftLabel.ContextMenu.PROPERTIES).select();
PropertySheet propertiesView = new PropertySheet();
propertiesView.activate();
}
use of org.eclipse.reddeer.swt.impl.menu.ContextMenuItem in project jbosstools-openshift by jbosstools.
the class OpenShiftResource method delete.
/**
* Deletes resource via properties view.
*/
public void delete() {
select();
new ContextMenuItem(OpenShiftLabel.ContextMenu.DELETE_RESOURCE).select();
new DefaultShell(OpenShiftLabel.Shell.DELETE_RESOURCE);
new OkButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.DELETE_RESOURCE), TimePeriod.LONG);
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
}
use of org.eclipse.reddeer.swt.impl.menu.ContextMenuItem 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());
}
Aggregations