Search in sources :

Example 31 with OkButton

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

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

Example 33 with OkButton

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

the class RunDockerImageLaunchConfiguration method editValueInTable.

private void editValueInTable(String tabName, String shellName, String oldValueName, String newValueName, String newValue) {
    selectTab(tabName);
    if (selectItemInTable(oldValueName)) {
        new PushButton("Edit...");
        new WaitWhile(new ShellIsAvailable(shellName));
        new LabeledText("Name:").setText(newValueName);
        new LabeledText("Value:").setText(newValue);
        new OkButton().click();
    } else {
        throw new EclipseLayerException("There is no " + oldValueName + " in table on tab " + tabName);
    }
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) OkButton(org.eclipse.reddeer.swt.impl.button.OkButton) EclipseLayerException(org.eclipse.reddeer.eclipse.exception.EclipseLayerException) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) LabeledText(org.eclipse.reddeer.swt.impl.text.LabeledText) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton)

Example 34 with OkButton

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

the class DockerImage method remove.

/**
 * * Removes docker image.
 */
public void remove() {
    select();
    new ContextMenu().getItem("Remove").select();
    Shell confirm = new DefaultShell("Confirm Remove Image");
    new OkButton().click();
    new WaitWhile(new ShellIsAvailable(confirm));
    new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
}
Also used : OkButton(org.eclipse.reddeer.swt.impl.button.OkButton) ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) Shell(org.eclipse.reddeer.swt.api.Shell) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) ContextMenu(org.eclipse.reddeer.swt.impl.menu.ContextMenu) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning)

Example 35 with OkButton

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

the class ImageRunResourceVolumesVariablesPage method addDataVolumeToContainer.

public void addDataVolumeToContainer(String containerPath, String containerName) {
    new PushButton(0, new WithTextMatcher("Add...")).click();
    new LabeledText("Container path:").setText(containerPath);
    new RadioButton("Mount a data volume container").click();
    new DefaultCombo("Container").setText(containerName);
    new OkButton().click();
}
Also used : OkButton(org.eclipse.reddeer.swt.impl.button.OkButton) DefaultCombo(org.eclipse.reddeer.swt.impl.combo.DefaultCombo) WithTextMatcher(org.eclipse.reddeer.core.matcher.WithTextMatcher) LabeledText(org.eclipse.reddeer.swt.impl.text.LabeledText) RadioButton(org.eclipse.reddeer.swt.impl.button.RadioButton) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton)

Aggregations

OkButton (org.eclipse.reddeer.swt.impl.button.OkButton)73 DefaultShell (org.eclipse.reddeer.swt.impl.shell.DefaultShell)48 ShellIsAvailable (org.eclipse.reddeer.swt.condition.ShellIsAvailable)45 WaitWhile (org.eclipse.reddeer.common.wait.WaitWhile)43 PushButton (org.eclipse.reddeer.swt.impl.button.PushButton)37 WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)32 LabeledText (org.eclipse.reddeer.swt.impl.text.LabeledText)32 JobIsRunning (org.eclipse.reddeer.workbench.core.condition.JobIsRunning)22 ControlIsEnabled (org.eclipse.reddeer.swt.condition.ControlIsEnabled)17 ContextMenuItem (org.eclipse.reddeer.swt.impl.menu.ContextMenuItem)15 Test (org.junit.Test)15 DefaultTable (org.eclipse.reddeer.swt.impl.table.DefaultTable)11 AbstractTest (org.jboss.tools.openshift.ui.bot.test.application.v3.basic.AbstractTest)11 CoreLayerException (org.eclipse.reddeer.core.exception.CoreLayerException)10 WithTextMatcher (org.eclipse.reddeer.core.matcher.WithTextMatcher)9 FinishButton (org.eclipse.reddeer.swt.impl.button.FinishButton)9 RadioButton (org.eclipse.reddeer.swt.impl.button.RadioButton)7 WaitTimeoutExpiredException (org.eclipse.reddeer.common.exception.WaitTimeoutExpiredException)6 Shell (org.eclipse.reddeer.swt.api.Shell)6 NextButton (org.eclipse.reddeer.swt.impl.button.NextButton)6