use of org.eclipse.reddeer.eclipse.equinox.security.ui.storage.PasswordProvider in project jbosstools-openshift by jbosstools.
the class StoreConnectionTest method cleanUp.
@AfterClass
public static void cleanUp() {
WorkbenchPreferenceDialog preferences = new WorkbenchPreferenceDialog();
preferences.open();
StoragePreferencePage storagePreferencePage = new StoragePreferencePage(preferences);
preferences.select(storagePreferencePage);
storagePreferencePage.selectPasswordsTab();
List<PasswordProvider> masterPasswordProviders = storagePreferencePage.getMasterPasswordProviders();
for (PasswordProvider tableItem : masterPasswordProviders) {
tableItem.setEnabled(true);
}
preferences.ok();
}
use of org.eclipse.reddeer.eclipse.equinox.security.ui.storage.PasswordProvider in project jbosstools-openshift by jbosstools.
the class StoreConnectionTest method setupClass.
@BeforeClass
public static void setupClass() {
WorkbenchPreferenceDialog preferences = new WorkbenchPreferenceDialog();
preferences.open();
StoragePreferencePage storagePreferencePage = new StoragePreferencePage(preferences);
preferences.select(storagePreferencePage);
storagePreferencePage.selectPasswordsTab();
List<PasswordProvider> masterPasswordProviders = storagePreferencePage.getMasterPasswordProviders();
for (PasswordProvider tableItem : masterPasswordProviders) {
// The second part of this if is because https://issues.jboss.org/browse/JBIDE-24567
if (tableItem.getDescription().contains("UI Prompt") || tableItem.getDescription().contains("secureStorageProvider.name")) {
tableItem.setEnabled(true);
} else {
tableItem.setEnabled(false);
}
}
preferences.ok();
}
use of org.eclipse.reddeer.eclipse.equinox.security.ui.storage.PasswordProvider in project jbosstools-openshift by jbosstools.
the class DisableSecureStorageRequirement method setSecureStorageMasterPasswords.
private void setSecureStorageMasterPasswords(boolean checked) {
WorkbenchPreferenceDialog preferenceDialog = new WorkbenchPreferenceDialog();
StoragePreferencePage storagePage = new StoragePreferencePage(preferenceDialog);
preferenceDialog.open();
preferenceDialog.select(storagePage);
try {
new WaitUntil(new WidgetIsFound(org.eclipse.swt.custom.CLabel.class, new WithMnemonicTextMatcher("Secure Storage")), TimePeriod.DEFAULT);
log.info("Getting master password providers");
List<PasswordProvider> items = storagePage.getMasterPasswordProviders();
for (PasswordProvider item : items) {
log.info("Uncheking table item: " + item.getDescription());
item.setEnabled(checked);
}
new WaitUntil(new JobIsRunning(), TimePeriod.DEFAULT, false);
storagePage.apply();
} catch (WaitTimeoutExpiredException exc) {
log.error("Secure Storage preferences page has timed out");
log.error(exc.getMessage());
} finally {
preferenceDialog.ok();
}
}
Aggregations