Search in sources :

Example 36 with PushButton

use of org.eclipse.reddeer.swt.impl.button.PushButton 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 37 with PushButton

use of org.eclipse.reddeer.swt.impl.button.PushButton in project linuxtools by eclipse.

the class RunDockerImageLaunchConfiguration method addDataVolumeToHost.

public void addDataVolumeToHost(String containerPath, String path, boolean readOnly) {
    selectTab(VOLUMES_TAB_LABEL);
    new PushButton("Add...").click();
    new LabeledText("Container path:").setText(containerPath);
    new RadioButton("Mount a host directory or host file").click();
    new LabeledText("Path:").setText(path);
    new CheckBox("Read-only access").toggle(readOnly);
    new OkButton().click();
}
Also used : OkButton(org.eclipse.reddeer.swt.impl.button.OkButton) LabeledText(org.eclipse.reddeer.swt.impl.text.LabeledText) CheckBox(org.eclipse.reddeer.swt.impl.button.CheckBox) RadioButton(org.eclipse.reddeer.swt.impl.button.RadioButton) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton)

Example 38 with PushButton

use of org.eclipse.reddeer.swt.impl.button.PushButton in project linuxtools by eclipse.

the class RunDockerImageLaunchConfiguration method runConfiguration.

public void runConfiguration(String configurationName) {
    selectConfiguration(configurationName);
    new PushButton("Run").click();
}
Also used : PushButton(org.eclipse.reddeer.swt.impl.button.PushButton)

Example 39 with PushButton

use of org.eclipse.reddeer.swt.impl.button.PushButton 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)

Example 40 with PushButton

use of org.eclipse.reddeer.swt.impl.button.PushButton in project linuxtools by eclipse.

the class RunDockerImageLaunchConfiguration method addLink.

// links tab
public void addLink(String containerName, String alias) {
    selectTab(LINKS_TAB_LABEL);
    new PushButton("Add...").click();
    new WaitWhile(new ShellIsAvailable("Container Linking"));
    new LabeledText("Container:").setText(containerName);
    new LabeledText("Value:").setText(alias);
    new OkButton().click();
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) OkButton(org.eclipse.reddeer.swt.impl.button.OkButton) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) LabeledText(org.eclipse.reddeer.swt.impl.text.LabeledText) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton)

Aggregations

PushButton (org.eclipse.reddeer.swt.impl.button.PushButton)94 WaitWhile (org.eclipse.reddeer.common.wait.WaitWhile)49 ShellIsAvailable (org.eclipse.reddeer.swt.condition.ShellIsAvailable)43 DefaultShell (org.eclipse.reddeer.swt.impl.shell.DefaultShell)41 WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)38 OkButton (org.eclipse.reddeer.swt.impl.button.OkButton)38 LabeledText (org.eclipse.reddeer.swt.impl.text.LabeledText)34 JobIsRunning (org.eclipse.reddeer.workbench.core.condition.JobIsRunning)28 DefaultTable (org.eclipse.reddeer.swt.impl.table.DefaultTable)20 ControlIsEnabled (org.eclipse.reddeer.swt.condition.ControlIsEnabled)17 Test (org.junit.Test)16 WithTextMatcher (org.eclipse.reddeer.core.matcher.WithTextMatcher)15 RadioButton (org.eclipse.reddeer.swt.impl.button.RadioButton)9 AbstractTest (org.jboss.tools.openshift.ui.bot.test.application.v3.basic.AbstractTest)8 YesButton (org.eclipse.reddeer.swt.impl.button.YesButton)7 WaitTimeoutExpiredException (org.eclipse.reddeer.common.exception.WaitTimeoutExpiredException)6 CoreLayerException (org.eclipse.reddeer.core.exception.CoreLayerException)6 Button (org.eclipse.reddeer.swt.api.Button)6 CheckBox (org.eclipse.reddeer.swt.impl.button.CheckBox)6 FinishButton (org.eclipse.reddeer.swt.impl.button.FinishButton)6