Search in sources :

Example 6 with WorkbenchShell

use of org.eclipse.reddeer.workbench.impl.shell.WorkbenchShell in project jbosstools-openshift by jbosstools.

the class AbstractOpenShiftApplicationWizard method openWizardFromCentral.

/**
 * Opens a new OpenShift application wizard from JBoss Central.
 */
public void openWizardFromCentral() {
    new DefaultToolItem(new WorkbenchShell(), OpenShiftLabel.Others.RED_HAT_CENTRAL).click();
    new WaitUntil(new CentralIsLoaded());
    new InternalBrowser().execute(OpenShiftLabel.Others.OPENSHIFT_CENTRAL_SCRIPT);
    new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.NEW_APP_WIZARD), TimePeriod.LONG);
    signToOpenShiftAndClickNext();
    new DefaultShell(OpenShiftLabel.Shell.NEW_APP_WIZARD).setFocus();
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) WorkbenchShell(org.eclipse.reddeer.workbench.impl.shell.WorkbenchShell) InternalBrowser(org.eclipse.reddeer.swt.impl.browser.InternalBrowser) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) DefaultToolItem(org.eclipse.reddeer.swt.impl.toolbar.DefaultToolItem) CentralIsLoaded(org.jboss.tools.openshift.reddeer.condition.CentralIsLoaded) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil)

Example 7 with WorkbenchShell

use of org.eclipse.reddeer.workbench.impl.shell.WorkbenchShell in project linuxtools by eclipse.

the class AbstractView method getViewCTabItem.

/**
 * Gets the view c tab item.
 *
 * @return the view c tab item
 */
protected CTabItem getViewCTabItem() {
    if (cTabItem != null && cTabItem.isDisposed()) {
        cTabItem = null;
    }
    if (cTabItem == null) {
        if (!isOpen()) {
            return cTabItem;
        }
        log.debug("Looking up CTabItem with text " + getTitle());
        cTabItem = new DefaultCTabItem(new WorkbenchShell(), viewNameMatcher);
    }
    return cTabItem;
}
Also used : WorkbenchShell(org.eclipse.reddeer.workbench.impl.shell.WorkbenchShell) DefaultCTabItem(org.eclipse.reddeer.swt.impl.ctab.DefaultCTabItem)

Example 8 with WorkbenchShell

use of org.eclipse.reddeer.workbench.impl.shell.WorkbenchShell 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);
}
Also used : WorkbenchShell(org.eclipse.reddeer.workbench.impl.shell.WorkbenchShell) WorkbenchPreferenceDialog(org.eclipse.reddeer.workbench.ui.dialogs.WorkbenchPreferenceDialog) StoragePreferencePage(org.eclipse.reddeer.eclipse.equinox.security.ui.storage.StoragePreferencePage)

Example 9 with WorkbenchShell

use of org.eclipse.reddeer.workbench.impl.shell.WorkbenchShell in project jbosstools-openshift by jbosstools.

the class DebuggingEAPAppTest method disableShowConsoleWhenOutputChanges.

private static void disableShowConsoleWhenOutputChanges() {
    ConsoleView consoleView = new ConsoleView();
    consoleView.open();
    new WaitUntil(new ShowConsoleOutputToolItemIsAvailable(), TimePeriod.VERY_LONG);
    DefaultToolItem showConsoleOnChange = new DefaultToolItem(new WorkbenchShell(), "Show Console Output When Standard Out Changes");
    showConsoleOnChange.click();
}
Also used : WorkbenchShell(org.eclipse.reddeer.workbench.impl.shell.WorkbenchShell) ConsoleView(org.eclipse.reddeer.eclipse.ui.console.ConsoleView) DefaultToolItem(org.eclipse.reddeer.swt.impl.toolbar.DefaultToolItem) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil)

Example 10 with WorkbenchShell

use of org.eclipse.reddeer.workbench.impl.shell.WorkbenchShell in project jbosstools-openshift by jbosstools.

the class StoreConnectionTest method invokeNewAppWizardFromCentral.

private void invokeNewAppWizardFromCentral() {
    new DefaultToolItem(new WorkbenchShell(), OpenShiftLabel.Others.RED_HAT_CENTRAL).click();
    new WaitUntil(new CentralIsLoaded());
    new InternalBrowser().execute(OpenShiftLabel.Others.OPENSHIFT_CENTRAL_SCRIPT);
    new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.NEW_APP_WIZARD), TimePeriod.LONG);
    new DefaultShell("New OpenShift Application");
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) WorkbenchShell(org.eclipse.reddeer.workbench.impl.shell.WorkbenchShell) InternalBrowser(org.eclipse.reddeer.swt.impl.browser.InternalBrowser) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) DefaultToolItem(org.eclipse.reddeer.swt.impl.toolbar.DefaultToolItem) CentralIsLoaded(org.jboss.tools.openshift.reddeer.condition.CentralIsLoaded) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil)

Aggregations

WorkbenchShell (org.eclipse.reddeer.workbench.impl.shell.WorkbenchShell)11 DefaultShell (org.eclipse.reddeer.swt.impl.shell.DefaultShell)8 WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)7 ShellIsAvailable (org.eclipse.reddeer.swt.condition.ShellIsAvailable)6 DefaultToolItem (org.eclipse.reddeer.swt.impl.toolbar.DefaultToolItem)5 WaitWhile (org.eclipse.reddeer.common.wait.WaitWhile)4 InternalBrowser (org.eclipse.reddeer.swt.impl.browser.InternalBrowser)4 JobIsRunning (org.eclipse.reddeer.workbench.core.condition.JobIsRunning)4 NextButton (org.eclipse.reddeer.swt.impl.button.NextButton)3 DefaultTreeItem (org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem)3 Test (org.junit.Test)3 ControlIsEnabled (org.eclipse.reddeer.swt.condition.ControlIsEnabled)2 BackButton (org.eclipse.reddeer.swt.impl.button.BackButton)2 FinishButton (org.eclipse.reddeer.swt.impl.button.FinishButton)2 OkButton (org.eclipse.reddeer.swt.impl.button.OkButton)2 DefaultCombo (org.eclipse.reddeer.swt.impl.combo.DefaultCombo)2 LabeledCombo (org.eclipse.reddeer.swt.impl.combo.LabeledCombo)2 LabeledText (org.eclipse.reddeer.swt.impl.text.LabeledText)2 CentralIsLoaded (org.jboss.tools.openshift.reddeer.condition.CentralIsLoaded)2 CoreLayerException (org.eclipse.reddeer.core.exception.CoreLayerException)1