Search in sources :

Example 86 with WaitUntil

use of org.eclipse.reddeer.common.wait.WaitUntil in project jbosstools-openshift by jbosstools.

the class AbstractOpenShiftApplicationWizard method finish.

/**
 * Waits and clicks Finish button.
 */
public void finish() {
    new WaitUntil(new ControlIsEnabled(new FinishButton()), TimePeriod.LONG);
    new FinishButton().click();
}
Also used : FinishButton(org.eclipse.reddeer.swt.impl.button.FinishButton) ControlIsEnabled(org.eclipse.reddeer.swt.condition.ControlIsEnabled) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil)

Example 87 with WaitUntil

use of org.eclipse.reddeer.common.wait.WaitUntil 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 88 with WaitUntil

use of org.eclipse.reddeer.common.wait.WaitUntil in project jbosstools-openshift by jbosstools.

the class OpenShift3ConnectionWizard method cancel.

/**
 * Waits and clicks Cancel button .
 */
public void cancel() {
    new WaitUntil(new ControlIsEnabled(new CancelButton()), TimePeriod.LONG);
    new CancelButton().click();
    waitForShellToClose(getShell());
}
Also used : ControlIsEnabled(org.eclipse.reddeer.swt.condition.ControlIsEnabled) CancelButton(org.eclipse.reddeer.swt.impl.button.CancelButton) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil)

Example 89 with WaitUntil

use of org.eclipse.reddeer.common.wait.WaitUntil in project linuxtools by eclipse.

the class RunDockerImageLaunchConfiguration method editPort.

public void editPort(String oldContainerPort, String newContainerPort, String newHostAddress, String newHostPort) {
    selectTab(PORTS_TAB_LABEL);
    setPublishAllExposedPortsToRandomPorts(false);
    if (selectItemInTable(oldContainerPort)) {
        new PushButton("Edit...");
        new WaitUntil(new ShellIsAvailable("Exposing a Container Port"));
        new LabeledText("Container port:").setText(newContainerPort);
        new LabeledText("Host address:").setText(newHostAddress);
        new LabeledText("Host port:").setText(newHostPort);
        new OkButton().click();
    } else {
        throw new EclipseLayerException("There is no " + oldContainerPort + " in table on tab " + PORTS_TAB_LABEL);
    }
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) OkButton(org.eclipse.reddeer.swt.impl.button.OkButton) EclipseLayerException(org.eclipse.reddeer.eclipse.exception.EclipseLayerException) LabeledText(org.eclipse.reddeer.swt.impl.text.LabeledText) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil)

Example 90 with WaitUntil

use of org.eclipse.reddeer.common.wait.WaitUntil in project linuxtools by eclipse.

the class RunDockerImageLaunchConfiguration method addPort.

public void addPort(String containerPort, String hostAddress, String hostPort) {
    selectTab(PORTS_TAB_LABEL);
    setPublishAllExposedPortsToRandomPorts(false);
    new PushButton("Add...").click();
    new WaitUntil(new ShellIsAvailable("Exposing a Container Port"));
    new LabeledText("Container port:").setText(containerPort);
    new LabeledText("Host address:").setText(hostAddress);
    new LabeledText("Host port:").setText(hostPort);
    new OkButton().click();
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) OkButton(org.eclipse.reddeer.swt.impl.button.OkButton) LabeledText(org.eclipse.reddeer.swt.impl.text.LabeledText) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil)

Aggregations

WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)178 ShellIsAvailable (org.eclipse.reddeer.swt.condition.ShellIsAvailable)74 WaitWhile (org.eclipse.reddeer.common.wait.WaitWhile)73 JobIsRunning (org.eclipse.reddeer.workbench.core.condition.JobIsRunning)63 DefaultShell (org.eclipse.reddeer.swt.impl.shell.DefaultShell)59 ControlIsEnabled (org.eclipse.reddeer.swt.condition.ControlIsEnabled)54 Test (org.junit.Test)44 PushButton (org.eclipse.reddeer.swt.impl.button.PushButton)40 WaitTimeoutExpiredException (org.eclipse.reddeer.common.exception.WaitTimeoutExpiredException)36 OkButton (org.eclipse.reddeer.swt.impl.button.OkButton)36 FinishButton (org.eclipse.reddeer.swt.impl.button.FinishButton)34 ContextMenuItem (org.eclipse.reddeer.swt.impl.menu.ContextMenuItem)30 LabeledText (org.eclipse.reddeer.swt.impl.text.LabeledText)25 AbstractTest (org.jboss.tools.openshift.ui.bot.test.application.v3.basic.AbstractTest)22 OpenShiftExplorerView (org.jboss.tools.openshift.reddeer.view.OpenShiftExplorerView)20 NextButton (org.eclipse.reddeer.swt.impl.button.NextButton)18 OpenShiftResourceExists (org.jboss.tools.openshift.reddeer.condition.OpenShiftResourceExists)18 BackButton (org.eclipse.reddeer.swt.impl.button.BackButton)15 DefaultTreeItem (org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem)13 RedDeerException (org.eclipse.reddeer.common.exception.RedDeerException)12