Search in sources :

Example 56 with DefaultShell

use of org.eclipse.reddeer.swt.impl.shell.DefaultShell in project jbosstools-openshift by jbosstools.

the class ServerSettingsWizardPage method importProject.

public ImportApplicationWizard importProject() {
    new DefaultShell(OpenShiftLabel.Shell.SERVER_ADAPTER_SETTINGS);
    new PushButton("Import...").click();
    new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.IMPORT_APPLICATION));
    return new ImportApplicationWizard();
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) ImportApplicationWizard(org.jboss.tools.openshift.reddeer.wizard.importapp.ImportApplicationWizard) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil)

Example 57 with DefaultShell

use of org.eclipse.reddeer.swt.impl.shell.DefaultShell in project jbosstools-openshift by jbosstools.

the class AbstractOpenShiftApplicationWizard method signToOpenShiftAndClickNext.

private void signToOpenShiftAndClickNext() {
    new DefaultShell(OpenShiftLabel.Shell.NEW_APP_WIZARD);
    selectConnection(username, server, new DefaultCombo(0));
    new NextButton().click();
    processUntrustedSSLCertificate();
    new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
    new WaitUntil(new ControlIsEnabled(new BackButton()), TimePeriod.LONG);
}
Also used : DefaultCombo(org.eclipse.reddeer.swt.impl.combo.DefaultCombo) NextButton(org.eclipse.reddeer.swt.impl.button.NextButton) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) ControlIsEnabled(org.eclipse.reddeer.swt.condition.ControlIsEnabled) BackButton(org.eclipse.reddeer.swt.impl.button.BackButton) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil)

Example 58 with DefaultShell

use of org.eclipse.reddeer.swt.impl.shell.DefaultShell 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 59 with DefaultShell

use of org.eclipse.reddeer.swt.impl.shell.DefaultShell in project jbosstools-openshift by jbosstools.

the class OpenShift3ConnectionWizard method finishAndHandleCertificate.

public void finishAndHandleCertificate() {
    new WaitUntil(new ControlIsEnabled(new FinishButton()), TimePeriod.LONG);
    new FinishButton().click();
    try {
        new DefaultShell(OpenShiftLabel.Shell.UNTRUSTED_SSL_CERTIFICATE);
        new PushButton("Yes").click();
    } catch (RedDeerException ex) {
        fail("Aceptance of SSL certificate failed.");
    }
    new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.NEW_CONNECTION), TimePeriod.LONG);
    new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) RedDeerException(org.eclipse.reddeer.common.exception.RedDeerException) FinishButton(org.eclipse.reddeer.swt.impl.button.FinishButton) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) ControlIsEnabled(org.eclipse.reddeer.swt.condition.ControlIsEnabled) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton)

Example 60 with DefaultShell

use of org.eclipse.reddeer.swt.impl.shell.DefaultShell in project jbosstools-openshift by jbosstools.

the class EnvironmentVariableWizardPage method removeEnvironmentVariable.

/**
 * Removes environment.
 *
 * @param envVar environment variable to remove
 * @return true if variable was removed successfully, false otherwise
 */
public boolean removeEnvironmentVariable(EnvVar envVar) {
    DefaultTable table = new DefaultTable();
    table.select(envVar.getName());
    new PushButton(OpenShiftLabel.Button.REMOVE_BASIC).click();
    new DefaultShell(OpenShiftLabel.Shell.REMOVE_ENV_VAR);
    new YesButton().click();
    new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.REMOVE_ENV_VAR));
    return !(table.containsItem(envVar.getName(), 0) && table.containsItem(envVar.getValue(), 1));
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) DefaultTable(org.eclipse.reddeer.swt.impl.table.DefaultTable) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton) YesButton(org.eclipse.reddeer.swt.impl.button.YesButton)

Aggregations

DefaultShell (org.eclipse.reddeer.swt.impl.shell.DefaultShell)129 WaitWhile (org.eclipse.reddeer.common.wait.WaitWhile)84 ShellIsAvailable (org.eclipse.reddeer.swt.condition.ShellIsAvailable)83 WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)57 OkButton (org.eclipse.reddeer.swt.impl.button.OkButton)49 JobIsRunning (org.eclipse.reddeer.workbench.core.condition.JobIsRunning)46 PushButton (org.eclipse.reddeer.swt.impl.button.PushButton)41 ContextMenuItem (org.eclipse.reddeer.swt.impl.menu.ContextMenuItem)36 LabeledText (org.eclipse.reddeer.swt.impl.text.LabeledText)30 FinishButton (org.eclipse.reddeer.swt.impl.button.FinishButton)28 Test (org.junit.Test)27 ControlIsEnabled (org.eclipse.reddeer.swt.condition.ControlIsEnabled)25 AbstractTest (org.jboss.tools.openshift.ui.bot.test.application.v3.basic.AbstractTest)18 Shell (org.eclipse.reddeer.swt.api.Shell)17 DefaultTreeItem (org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem)17 OpenShiftExplorerView (org.jboss.tools.openshift.reddeer.view.OpenShiftExplorerView)17 WaitTimeoutExpiredException (org.eclipse.reddeer.common.exception.WaitTimeoutExpiredException)16 CoreLayerException (org.eclipse.reddeer.core.exception.CoreLayerException)16 YesButton (org.eclipse.reddeer.swt.impl.button.YesButton)16 DefaultTable (org.eclipse.reddeer.swt.impl.table.DefaultTable)16