Search in sources :

Example 6 with FinishButton

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

the class NewDockerConnectionPage method finish.

public void finish() {
    new WaitUntil(new ShellIsAvailable(NEW_DOCKER_CONNECTION_SHELL));
    new WaitUntil(new ControlIsEnabled(new FinishButton()));
    new FinishButton().click();
    new WaitWhile(new ShellIsAvailable(NEW_DOCKER_CONNECTION_SHELL), TimePeriod.LONG);
    new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG);
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) FinishButton(org.eclipse.reddeer.swt.impl.button.FinishButton) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) ControlIsEnabled(org.eclipse.reddeer.swt.condition.ControlIsEnabled) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil)

Example 7 with FinishButton

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

the class DockerImagesTab method buildImage.

public void buildImage(String name, String directory) {
    activate();
    new DefaultToolItem("Build Image").click();
    new WaitUntil(new ShellIsAvailable("Build a Docker Image"));
    new LabeledText("Image Name:").setText(name);
    new LabeledText("Directory:").setText(directory);
    new FinishButton().click();
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) FinishButton(org.eclipse.reddeer.swt.impl.button.FinishButton) LabeledText(org.eclipse.reddeer.swt.impl.text.LabeledText) DefaultToolItem(org.eclipse.reddeer.swt.impl.toolbar.DefaultToolItem) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil)

Example 8 with FinishButton

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

the class DockerImagesTab method addTagToImage.

public void addTagToImage(String imageName, String newTag) {
    selectImage(imageName);
    new ContextMenu().getItem("Add Tag").select();
    new DefaultShell("Tag Image");
    new LabeledText("New Tag:").setText(newTag);
    new FinishButton().click();
}
Also used : FinishButton(org.eclipse.reddeer.swt.impl.button.FinishButton) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) LabeledText(org.eclipse.reddeer.swt.impl.text.LabeledText) ContextMenu(org.eclipse.reddeer.swt.impl.menu.ContextMenu)

Example 9 with FinishButton

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

the class DockerImagesTab method pushImage.

public void pushImage(String imageName, String registryAccount, boolean forceTagging, boolean keepTaggedImage) {
    selectImage(imageName);
    new ContextMenu().getItem("Push...").select();
    Combo combo = new DefaultCombo();
    combo.setSelection(registryAccount);
    new CheckBox("Force tagging image with selected registry").toggle(forceTagging);
    new CheckBox("Keep tagged image upon completion").toggle(keepTaggedImage);
    new FinishButton().click();
}
Also used : DefaultCombo(org.eclipse.reddeer.swt.impl.combo.DefaultCombo) FinishButton(org.eclipse.reddeer.swt.impl.button.FinishButton) CheckBox(org.eclipse.reddeer.swt.impl.button.CheckBox) ContextMenu(org.eclipse.reddeer.swt.impl.menu.ContextMenu) Combo(org.eclipse.reddeer.swt.api.Combo) DefaultCombo(org.eclipse.reddeer.swt.impl.combo.DefaultCombo)

Example 10 with FinishButton

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

the class DockerImagesTab method removeTagFromImage.

public void removeTagFromImage(String imageName, String tagToBeRemoved) {
    selectImage(imageName);
    new ContextMenu().getItem("Remove Tag").select();
    String fullTag = "";
    Combo combo = new DefaultCombo();
    List<String> comboItems = combo.getItems();
    for (String item : comboItems) {
        if (item.contains(tagToBeRemoved)) {
            fullTag = item;
            break;
        }
    }
    combo.setSelection(fullTag);
    new FinishButton().click();
}
Also used : DefaultCombo(org.eclipse.reddeer.swt.impl.combo.DefaultCombo) FinishButton(org.eclipse.reddeer.swt.impl.button.FinishButton) ContextMenu(org.eclipse.reddeer.swt.impl.menu.ContextMenu) Combo(org.eclipse.reddeer.swt.api.Combo) DefaultCombo(org.eclipse.reddeer.swt.impl.combo.DefaultCombo)

Aggregations

FinishButton (org.eclipse.reddeer.swt.impl.button.FinishButton)59 WaitWhile (org.eclipse.reddeer.common.wait.WaitWhile)36 WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)32 JobIsRunning (org.eclipse.reddeer.workbench.core.condition.JobIsRunning)31 ShellIsAvailable (org.eclipse.reddeer.swt.condition.ShellIsAvailable)30 DefaultShell (org.eclipse.reddeer.swt.impl.shell.DefaultShell)28 ControlIsEnabled (org.eclipse.reddeer.swt.condition.ControlIsEnabled)24 LabeledText (org.eclipse.reddeer.swt.impl.text.LabeledText)23 Test (org.junit.Test)14 NextButton (org.eclipse.reddeer.swt.impl.button.NextButton)13 ContextMenuItem (org.eclipse.reddeer.swt.impl.menu.ContextMenuItem)11 OpenShiftExplorerView (org.jboss.tools.openshift.reddeer.view.OpenShiftExplorerView)9 CheckBox (org.eclipse.reddeer.swt.impl.button.CheckBox)8 OkButton (org.eclipse.reddeer.swt.impl.button.OkButton)8 NewCDKServerWizard (org.jboss.tools.cdk.reddeer.server.ui.wizard.NewCDKServerWizard)8 DefaultCombo (org.eclipse.reddeer.swt.impl.combo.DefaultCombo)7 RedDeerException (org.eclipse.reddeer.common.exception.RedDeerException)6 LabeledCombo (org.eclipse.reddeer.swt.impl.combo.LabeledCombo)6 ContextMenu (org.eclipse.reddeer.swt.impl.menu.ContextMenu)6 AbstractTest (org.jboss.tools.openshift.ui.bot.test.application.v3.basic.AbstractTest)6