use of org.eclipse.reddeer.workbench.ui.dialogs.WorkbenchPreferenceDialog in project jbosstools-openshift by jbosstools.
the class CDKTestUtils method removeAccessRedHatCredentials.
// removes access redhat com credentials used for first cdk run
public static void removeAccessRedHatCredentials(String domain, String username) {
WorkbenchPreferenceDialog dialog = new WorkbenchPreferenceDialog();
dialog.open();
// $NON-NLS-1$ //$NON-NLS-2$
dialog.select("JBoss Tools", "Credentials");
try {
new WaitUntil(new WidgetIsFound(org.eclipse.swt.custom.CLabel.class, new WithMnemonicTextMatcher("Credentials")), // $NON-NLS-1$
TimePeriod.MEDIUM);
// $NON-NLS-1$
new DefaultCLabel("Credentials");
DefaultTree tree = new DefaultTree(1);
TreeItem item = TreeViewerHandler.getInstance().getTreeItem(tree, new String[] { domain, username });
item.select();
// $NON-NLS-1$
new PushButton(new WithTextMatcher("Remove User")).click();
new WaitUntil(new JobIsRunning(), TimePeriod.MEDIUM, false);
} catch (WaitTimeoutExpiredException exc) {
// $NON-NLS-1$
log.error("JBoss Tools - Credentials preferences page has timed out");
exc.printStackTrace();
} catch (JFaceLayerException exc) {
// $NON-NLS-1$
log.error("JBoss Tools - Credentials does not contain required username to be deleted");
exc.printStackTrace();
} finally {
dialog.ok();
}
}
use of org.eclipse.reddeer.workbench.ui.dialogs.WorkbenchPreferenceDialog in project jbosstools-openshift by jbosstools.
the class CDKServerAdapterAbstractTest method deleteCertificates.
/**
* Deletes all Openshift 3 SSL certificates that were accepted from
* Preferences -> JBossTools -> OpenShift 3 -> SSL Certificates
*/
public static void deleteCertificates() {
WorkbenchPreferenceDialog dialog = new WorkbenchPreferenceDialog();
dialog.open();
OpenShift3SSLCertificatePreferencePage preferencePage = new OpenShift3SSLCertificatePreferencePage(dialog);
dialog.select(preferencePage);
preferencePage.deleteAll();
preferencePage.apply();
dialog.ok();
}
use of org.eclipse.reddeer.workbench.ui.dialogs.WorkbenchPreferenceDialog in project jbosstools-openshift by jbosstools.
the class GetOpenShiftIOTokenTest method checkPluginInSecureStorage.
private void checkPluginInSecureStorage() {
WorkbenchPreferenceDialog preferences = new WorkbenchPreferenceDialog();
preferences.open();
StoragePreferencePage storagePreferencePage = new StoragePreferencePage(preferences);
preferences.select(storagePreferencePage);
storagePreferencePage.selectContentTab();
DefaultTreeItem account = new DefaultTreeItem(new DefaultTree(storagePreferencePage, 1), "[Default Secure Storage]", "org.jboss.tools.openshift.io.core", "accounts", "OpenShift.io", DatastoreOS3.OPENSHIFT_IO_USERNAME);
account.select();
assertNotNull("Account does not exists in secure storage", account);
preferences.ok();
}
use of org.eclipse.reddeer.workbench.ui.dialogs.WorkbenchPreferenceDialog in project jbosstools-openshift by jbosstools.
the class GetOpenShiftIOTokenTest method checkAccountInProperties.
private void checkAccountInProperties() {
WorkbenchPreferenceDialog preferences = new WorkbenchPreferenceDialog();
preferences.open();
OpenShifIOPreferencePage page = new OpenShifIOPreferencePage(preferences);
preferences.select(page);
assertTrue("Account is not configured!", page.existsOpenShiftIOAccount());
preferences.ok();
}
use of org.eclipse.reddeer.workbench.ui.dialogs.WorkbenchPreferenceDialog in project jbosstools-openshift by jbosstools.
the class TestUtils method setVisualEditorToUseHTML5.
public static void setVisualEditorToUseHTML5() {
WorkbenchPreferenceDialog dialog = new WorkbenchPreferenceDialog();
dialog.open();
dialog.select("JBoss Tools", "Web", "Editors", "Visual Page Editor");
RadioButton button = new RadioButton("HTML5 (use WebKit)");
if (button.isEnabled() && !button.isSelected()) {
button.click();
}
CheckBox checkBox = new CheckBox("Do not show Browser Engine dialog");
if (checkBox.isEnabled() && !checkBox.isChecked()) {
checkBox.click();
}
new PushButton("Apply").click();
dialog.ok();
}
Aggregations