use of org.eclipse.reddeer.swt.impl.shell.DefaultShell in project jbosstools-openshift by jbosstools.
the class DeployDockerImageTest method openDeployToOpenShiftWizardFromDockerExplorer.
/**
* Opens a Deploy Image to OpenShift wizard from context menu of a docker image
*/
private void openDeployToOpenShiftWizardFromDockerExplorer() {
dockerExplorer.getDockerConnectionByName(DOCKER_CONNECTION).getImage(HELLO_OS_DOCKER_IMAGE, TAG).select();
new ContextMenuItem(OpenShiftLabel.ContextMenu.DEPLOY_TO_OPENSHIFT).select();
new DefaultShell(OpenShiftLabel.Shell.DEPLOY_IMAGE_TO_OPENSHIFT);
}
use of org.eclipse.reddeer.swt.impl.shell.DefaultShell in project jbosstools-openshift by jbosstools.
the class GetOpenShiftIOTokenTest method testGetToken.
@Test
public void testGetToken() {
new DefaultToolItem(new WorkbenchShell(), "Connect to OpenShift.io").click();
DefaultShell browser = new DefaultShell();
InternalBrowser internalBrowser = new InternalBrowser(browser);
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
new WaitUntil(new BrowserContainsText("OpenShift.io Developer Preview"), TimePeriod.LONG);
internalBrowser.execute(String.format("document.getElementById(\"username\").value=\"%s\"", DatastoreOS3.OPENSHIFT_IO_USERNAME));
internalBrowser.execute(String.format("document.getElementById(\"password\").value=\"%s\"", DatastoreOS3.OPENSHIFT_IO_PASSWORD));
internalBrowser.execute("document.getElementById(\"password\").parentElement.parentElement.parentElement.submit()");
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
try {
new DefaultShell("OpenShift.io");
} catch (CoreLayerException ex) {
// Secure storage has been triggered
SecureStorage.handleSecureStoragePasswordAndHint(SystemProperties.SECURE_STORAGE_PASSWORD);
new DefaultShell("OpenShift.io");
}
new OkButton().click();
checkAccountInProperties();
checkPluginInSecureStorage();
}
use of org.eclipse.reddeer.swt.impl.shell.DefaultShell 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.shell.DefaultShell 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.shell.DefaultShell 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