Search in sources :

Example 66 with ShellIsAvailable

use of org.eclipse.reddeer.swt.condition.ShellIsAvailable 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 67 with ShellIsAvailable

use of org.eclipse.reddeer.swt.condition.ShellIsAvailable in project linuxtools by eclipse.

the class DockerConnection method pullImage.

public void pullImage(String imageName, String imageTag, String dockerRegister) {
    if (getImage(imageName, imageTag) == null) {
        refreshImages();
        treeViewerHandler.getTreeItem(item, "Images").select();
        new ContextMenu().getItem("Pull...").select();
        new WaitUntil(new ShellIsAvailable("Pull Image"), TimePeriod.DEFAULT);
        Shell pullShell = new DefaultShell("Pull Image");
        // select register
        if (dockerRegister != null) {
            Combo combo = new DefaultCombo();
            combo.setSelection(dockerRegister);
        }
        new LabeledText(IMAGE_NAME_LABEL_DIALOG).setFocus();
        new LabeledText(IMAGE_NAME_LABEL_DIALOG).setText(imageTag == null ? imageName : imageName + ":" + imageTag);
        new WaitUntil(new ControlIsEnabled(new FinishButton()));
        new FinishButton(pullShell).click();
        new WaitWhile(new ShellIsAvailable(pullShell));
        new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG);
    }
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) DefaultCombo(org.eclipse.reddeer.swt.impl.combo.DefaultCombo) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) Shell(org.eclipse.reddeer.swt.api.Shell) FinishButton(org.eclipse.reddeer.swt.impl.button.FinishButton) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) LabeledText(org.eclipse.reddeer.swt.impl.text.LabeledText) ControlIsEnabled(org.eclipse.reddeer.swt.condition.ControlIsEnabled) ContextMenu(org.eclipse.reddeer.swt.impl.menu.ContextMenu) Combo(org.eclipse.reddeer.swt.api.Combo) DefaultCombo(org.eclipse.reddeer.swt.impl.combo.DefaultCombo) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil)

Example 68 with ShellIsAvailable

use of org.eclipse.reddeer.swt.condition.ShellIsAvailable in project linuxtools by eclipse.

the class DockerConnection method openImageSearchDialog.

public void openImageSearchDialog(String imageName, String imageTag, String dockerRegister) {
    refreshImages();
    treeViewerHandler.getTreeItem(item, "Images").select();
    new ContextMenu().getItem("Pull...").select();
    new WaitUntil(new ShellIsAvailable("Pull Image"), TimePeriod.DEFAULT);
    // select register
    if (dockerRegister != null) {
        Combo combo = new DefaultCombo();
        combo.setSelection(dockerRegister);
    }
    new LabeledText(IMAGE_NAME_LABEL_DIALOG).setFocus();
    new LabeledText(IMAGE_NAME_LABEL_DIALOG).setText(imageTag == null ? imageName : imageName + ":" + imageTag);
    new PushButton("Search...").click();
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) DefaultCombo(org.eclipse.reddeer.swt.impl.combo.DefaultCombo) LabeledText(org.eclipse.reddeer.swt.impl.text.LabeledText) ContextMenu(org.eclipse.reddeer.swt.impl.menu.ContextMenu) Combo(org.eclipse.reddeer.swt.api.Combo) DefaultCombo(org.eclipse.reddeer.swt.impl.combo.DefaultCombo) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton)

Example 69 with ShellIsAvailable

use of org.eclipse.reddeer.swt.condition.ShellIsAvailable 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 70 with ShellIsAvailable

use of org.eclipse.reddeer.swt.condition.ShellIsAvailable in project linuxtools by eclipse.

the class HierarchyViewTest method openDockerImageHierarchyTab.

private DockerImageHierarchyTab openDockerImageHierarchyTab() {
    getConnection().getImage(IMAGE_TEST_BUILD).openImageHierarchy();
    new WaitWhile(new ShellIsAvailable("Docker Image Hierarchy"));
    DockerImageHierarchyTab hierarchyTab = new DockerImageHierarchyTab();
    hierarchyTab.open();
    return hierarchyTab;
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) DockerImageHierarchyTab(org.eclipse.linuxtools.docker.reddeer.ui.DockerImageHierarchyTab)

Aggregations

ShellIsAvailable (org.eclipse.reddeer.swt.condition.ShellIsAvailable)128 WaitWhile (org.eclipse.reddeer.common.wait.WaitWhile)97 DefaultShell (org.eclipse.reddeer.swt.impl.shell.DefaultShell)84 WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)73 JobIsRunning (org.eclipse.reddeer.workbench.core.condition.JobIsRunning)52 OkButton (org.eclipse.reddeer.swt.impl.button.OkButton)47 PushButton (org.eclipse.reddeer.swt.impl.button.PushButton)44 ContextMenuItem (org.eclipse.reddeer.swt.impl.menu.ContextMenuItem)33 FinishButton (org.eclipse.reddeer.swt.impl.button.FinishButton)32 LabeledText (org.eclipse.reddeer.swt.impl.text.LabeledText)30 ControlIsEnabled (org.eclipse.reddeer.swt.condition.ControlIsEnabled)25 Test (org.junit.Test)21 CancelButton (org.eclipse.reddeer.swt.impl.button.CancelButton)19 WaitTimeoutExpiredException (org.eclipse.reddeer.common.exception.WaitTimeoutExpiredException)18 DefaultTable (org.eclipse.reddeer.swt.impl.table.DefaultTable)18 Shell (org.eclipse.reddeer.swt.api.Shell)17 YesButton (org.eclipse.reddeer.swt.impl.button.YesButton)14 DefaultTreeItem (org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem)13 OpenShiftExplorerView (org.jboss.tools.openshift.reddeer.view.OpenShiftExplorerView)13 RedDeerException (org.eclipse.reddeer.common.exception.RedDeerException)10