use of org.jboss.tools.openshift.reddeer.view.resources.AbstractOpenShiftConnection 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