use of org.eclipse.reddeer.workbench.ui.dialogs.WorkbenchPreferenceDialog in project linuxtools by eclipse.
the class AbstractImageBotTest method setUpRegister.
protected void setUpRegister(String serverAddress, String email, String userName, String password) {
WorkbenchPreferenceDialog dialog = new WorkbenchPreferenceDialog();
RegistryAccountsPreferencePage page = new RegistryAccountsPreferencePage(dialog);
dialog.open();
dialog.select(page);
page.removeRegistry(serverAddress);
page.addRegistry(serverAddress, email, userName, password);
try {
new DefaultShell("New Registry Account").setFocus();
} catch (CoreLayerException e) {
new DefaultShell("Preferences").setFocus();
}
new PushButton("Apply and Close").click();
}
use of org.eclipse.reddeer.workbench.ui.dialogs.WorkbenchPreferenceDialog in project linuxtools by eclipse.
the class ComposeTest method testCompose.
@Test
public void testCompose() {
// Set up Docker Compose location
PreferenceDialog dialog = new WorkbenchPreferenceDialog();
DockerComposePreferencePage composePreference = new DockerComposePreferencePage(dialog);
dialog.open();
dialog.select(composePreference);
composePreference.setPathToDockerCompose(this.dockerComposePath);
composePreference.apply();
new PushButton("Apply and Close").click();
// Build Image
DockerImagesTab imagesTab = openDockerImagesTab();
buildImage(IMAGE_NAME, PATH_TEST_COMPOSE, imagesTab);
assertConsoleSuccess();
// Import resource folder
importProject(PATH_TEST_COMPOSE);
// Run Docker Compose
runDockerCompose(PROJECT_TEST_COMPOSE, FILE_DOCKER_COMPOSE);
// Check if application is running
WebBrowserView browserView = new WebBrowserView();
browserView.open();
// Skip browser contents check, if mockito is used
if (!mockitoIsUsed()) {
browserView.openPageURL(URL);
BrowserContentsCheck.checkBrowserForErrorPage(browserView, URL);
}
}
use of org.eclipse.reddeer.workbench.ui.dialogs.WorkbenchPreferenceDialog in project jbosstools-openshift by jbosstools.
the class OpenShiftCommandLineToolsRequirement method openDialogAndSelectPage.
private void openDialogAndSelectPage() {
dialog = new WorkbenchPreferenceDialog();
page = new OpenShift3PreferencePage(dialog);
dialog.open();
dialog.select(page);
}
use of org.eclipse.reddeer.workbench.ui.dialogs.WorkbenchPreferenceDialog in project jbosstools-openshift by jbosstools.
the class SecureStorage method verifySecureStorageOfPassword.
/**
* Verifies whether state of password storage for specified user is in correct
* state.
*
* @param username
* @param server
* URL of OpenShift server without https prefix
* @param shouldExist
* if true, password should be present in secure storage, if false,
* there should be no password in secure storage for specified
* connection
* @param serverType
* OpenShift v2 or v3 server
*/
public static void verifySecureStorageOfPassword(String username, String server, boolean shouldExist) {
WorkbenchPreferenceDialog workbenchPreferenceDialog = new WorkbenchPreferenceDialog();
StoragePreferencePage secureStoragePreferencePage = new StoragePreferencePage(workbenchPreferenceDialog);
new WorkbenchShell().setFocus();
workbenchPreferenceDialog.open();
new WorkbenchPreferenceDialog().select(secureStoragePreferencePage);
secureStoragePreferencePage.selectContentTab();
boolean exists = secureStoragePreferencePage.passwordExists("[Default Secure Storage]", getPluginId(), server, username);
workbenchPreferenceDialog.ok();
assertTrue(shouldExist ? "Password wasn't present in secure storage while it should." : "Password was present in secure storage but it shouldn't.", shouldExist == exists);
}
use of org.eclipse.reddeer.workbench.ui.dialogs.WorkbenchPreferenceDialog in project jbosstools-openshift by jbosstools.
the class CDKTestUtils method setOCToPreferences.
public static void setOCToPreferences(String ocPath) {
WorkbenchPreferenceDialog dialog = new WorkbenchPreferenceDialog();
OpenShift3PreferencePage page = new OpenShift3PreferencePage(dialog);
dialog.open();
dialog.select(page);
page.setOCLocation(ocPath);
try {
new WaitUntil(new ControlIsEnabled(new PushButton("Apply")), TimePeriod.DEFAULT);
} catch (WaitTimeoutExpiredException exc) {
fail("WaitTimeoutExpiredException occured while processing oc binary on path " + ocPath);
}
page.apply();
dialog.cancel();
}
Aggregations