Search in sources :

Example 6 with WorkbenchPreferenceDialog

use of org.eclipse.reddeer.workbench.ui.dialogs.WorkbenchPreferenceDialog 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();
    }
}
Also used : WithMnemonicTextMatcher(org.eclipse.reddeer.core.matcher.WithMnemonicTextMatcher) WidgetIsFound(org.eclipse.reddeer.core.condition.WidgetIsFound) WorkbenchPreferenceDialog(org.eclipse.reddeer.workbench.ui.dialogs.WorkbenchPreferenceDialog) WaitTimeoutExpiredException(org.eclipse.reddeer.common.exception.WaitTimeoutExpiredException) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil) PasswordProvider(org.eclipse.reddeer.eclipse.equinox.security.ui.storage.PasswordProvider) StoragePreferencePage(org.eclipse.reddeer.eclipse.equinox.security.ui.storage.StoragePreferencePage)

Example 7 with WorkbenchPreferenceDialog

use of org.eclipse.reddeer.workbench.ui.dialogs.WorkbenchPreferenceDialog in project jbosstools-openshift by jbosstools.

the class CDKServerAdapterAbstractTest method printCertificates.

/**
 * Prints out Openshift 3 accepted certificates
 */
protected static void printCertificates() {
    WorkbenchPreferenceDialog dialog = new WorkbenchPreferenceDialog();
    dialog.open();
    OpenShift3SSLCertificatePreferencePage preferencePage = new OpenShift3SSLCertificatePreferencePage(dialog);
    dialog.select(preferencePage);
    preferencePage.printCertificates();
    dialog.ok();
}
Also used : WorkbenchPreferenceDialog(org.eclipse.reddeer.workbench.ui.dialogs.WorkbenchPreferenceDialog) OpenShift3SSLCertificatePreferencePage(org.jboss.tools.cdk.reddeer.preferences.OpenShift3SSLCertificatePreferencePage)

Example 8 with WorkbenchPreferenceDialog

use of org.eclipse.reddeer.workbench.ui.dialogs.WorkbenchPreferenceDialog in project jbosstools-openshift by jbosstools.

the class GetOpenShiftIOTokenTest method removeAccountFromOpenShiftIOPreferencePage.

private static void removeAccountFromOpenShiftIOPreferencePage() {
    WorkbenchPreferenceDialog preferences = new WorkbenchPreferenceDialog();
    preferences.open();
    OpenShifIOPreferencePage page = new OpenShifIOPreferencePage(preferences);
    preferences.select(page);
    if (page.existsOpenShiftIOAccount()) {
        page.remove();
    }
    preferences.ok();
}
Also used : WorkbenchPreferenceDialog(org.eclipse.reddeer.workbench.ui.dialogs.WorkbenchPreferenceDialog) OpenShifIOPreferencePage(org.jboss.tools.openshift.reddeer.preference.page.OpenShifIOPreferencePage)

Example 9 with WorkbenchPreferenceDialog

use of org.eclipse.reddeer.workbench.ui.dialogs.WorkbenchPreferenceDialog in project jbosstools-openshift by jbosstools.

the class TestUtils method setOCBinaryPath.

private static void setOCBinaryPath(boolean setUp) {
    WorkbenchPreferenceDialog dialog = new WorkbenchPreferenceDialog();
    OpenShift3PreferencePage page = new OpenShift3PreferencePage(dialog);
    dialog.open();
    dialog.select(page);
    if (setUp) {
        page.setOCLocation(OpenShiftCommandLineToolsRequirement.getDefaultOCLocation());
    } else {
        page.clearOCLocation();
    }
    page.apply();
    dialog.ok();
}
Also used : OpenShift3PreferencePage(org.jboss.tools.openshift.reddeer.preference.page.OpenShift3PreferencePage) WorkbenchPreferenceDialog(org.eclipse.reddeer.workbench.ui.dialogs.WorkbenchPreferenceDialog)

Example 10 with WorkbenchPreferenceDialog

use of org.eclipse.reddeer.workbench.ui.dialogs.WorkbenchPreferenceDialog in project linuxtools by eclipse.

the class AbstractImageBotTest method deleteRegister.

protected void deleteRegister(String serverAddress) {
    WorkbenchPreferenceDialog dialog = new WorkbenchPreferenceDialog();
    RegistryAccountsPreferencePage page = new RegistryAccountsPreferencePage(dialog);
    dialog.open();
    dialog.select(page);
    page.removeRegistry(serverAddress);
    new WaitWhile(new JobIsRunning());
    dialog.ok();
}
Also used : WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) WorkbenchPreferenceDialog(org.eclipse.reddeer.workbench.ui.dialogs.WorkbenchPreferenceDialog) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning) RegistryAccountsPreferencePage(org.eclipse.linuxtools.docker.reddeer.preferences.RegistryAccountsPreferencePage)

Aggregations

WorkbenchPreferenceDialog (org.eclipse.reddeer.workbench.ui.dialogs.WorkbenchPreferenceDialog)20 PushButton (org.eclipse.reddeer.swt.impl.button.PushButton)6 StoragePreferencePage (org.eclipse.reddeer.eclipse.equinox.security.ui.storage.StoragePreferencePage)5 OpenShift3PreferencePage (org.jboss.tools.openshift.reddeer.preference.page.OpenShift3PreferencePage)4 WaitTimeoutExpiredException (org.eclipse.reddeer.common.exception.WaitTimeoutExpiredException)3 WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)3 PasswordProvider (org.eclipse.reddeer.eclipse.equinox.security.ui.storage.PasswordProvider)3 JobIsRunning (org.eclipse.reddeer.workbench.core.condition.JobIsRunning)3 RegistryAccountsPreferencePage (org.eclipse.linuxtools.docker.reddeer.preferences.RegistryAccountsPreferencePage)2 WaitWhile (org.eclipse.reddeer.common.wait.WaitWhile)2 WidgetIsFound (org.eclipse.reddeer.core.condition.WidgetIsFound)2 WithMnemonicTextMatcher (org.eclipse.reddeer.core.matcher.WithMnemonicTextMatcher)2 DefaultShell (org.eclipse.reddeer.swt.impl.shell.DefaultShell)2 DefaultTree (org.eclipse.reddeer.swt.impl.tree.DefaultTree)2 OpenShift3SSLCertificatePreferencePage (org.jboss.tools.cdk.reddeer.preferences.OpenShift3SSLCertificatePreferencePage)2 OpenShifIOPreferencePage (org.jboss.tools.openshift.reddeer.preference.page.OpenShifIOPreferencePage)2 AbstractImageBotTest (org.eclipse.linuxtools.docker.integration.tests.image.AbstractImageBotTest)1 DockerComposePreferencePage (org.eclipse.linuxtools.docker.reddeer.preferences.DockerComposePreferencePage)1 DockerImagesTab (org.eclipse.linuxtools.docker.reddeer.ui.DockerImagesTab)1 CoreLayerException (org.eclipse.reddeer.core.exception.CoreLayerException)1