Search in sources :

Example 11 with PushButton

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

the class RunDockerImageLaunchConfiguration method addDataVolumeNoExternalMount.

public void addDataVolumeNoExternalMount(String containerPath) {
    selectTab(VOLUMES_TAB_LABEL);
    new PushButton("Add..").click();
    new LabeledText("Container path:").setText(containerPath);
    new RadioButton("No external mount").click();
    new OkButton().click();
}
Also used : OkButton(org.eclipse.reddeer.swt.impl.button.OkButton) LabeledText(org.eclipse.reddeer.swt.impl.text.LabeledText) RadioButton(org.eclipse.reddeer.swt.impl.button.RadioButton) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton)

Example 12 with PushButton

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

the class RunDockerImageLaunchConfiguration method addDataVolumeToContainer.

public void addDataVolumeToContainer(String containerPath, String containerName) {
    selectTab(VOLUMES_TAB_LABEL);
    new PushButton("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) LabeledText(org.eclipse.reddeer.swt.impl.text.LabeledText) RadioButton(org.eclipse.reddeer.swt.impl.button.RadioButton) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton)

Example 13 with PushButton

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

the class RunDockerImageLaunchConfiguration method editLink.

public void editLink(String oldContainer, String newContainer, String newAlias) {
    selectTab(LINKS_TAB_LABEL);
    if (selectItemInTable(oldContainer)) {
        new PushButton("Edit...").click();
        new WaitWhile(new ShellIsAvailable("Container Linking"));
        new LabeledText("Container:").setText(newContainer);
        new LabeledText("Value:").setText(newAlias);
        new OkButton().click();
    } else {
        throw new EclipseLayerException("There is no " + oldContainer + " in table on tab " + LINKS_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) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) LabeledText(org.eclipse.reddeer.swt.impl.text.LabeledText) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton)

Example 14 with PushButton

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

the class RunDockerImageLaunchConfiguration method addValueInTable.

private void addValueInTable(String tabName, String shellName, String newValueName, String newValue) {
    selectTab(tabName);
    new PushButton("Add...").click();
    new WaitUntil(new ShellIsAvailable(shellName));
    new LabeledText("Name:").setText(newValueName);
    new LabeledText("Value:").setText(newValue);
    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 15 with PushButton

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

the class DockerContainer method remove.

public void remove() {
    select();
    boolean removeEnabled = new ContextMenu().getItem("Remove").isEnabled();
    if (!removeEnabled) {
        new ContextMenu().getItem("Stop").select();
        new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
        item.select();
    }
    new ContextMenu().getItem("Remove").select();
    new WaitUntil(new ShellIsAvailable("Confirm Remove Container"), TimePeriod.DEFAULT);
    new PushButton("OK").click();
    new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) ContextMenu(org.eclipse.reddeer.swt.impl.menu.ContextMenu) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil) 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