Search in sources :

Example 16 with JobIsRunning

use of org.eclipse.reddeer.workbench.core.condition.JobIsRunning in project linuxtools by eclipse.

the class SearchDialogTest method testSearchDialog.

@Test
public void testSearchDialog() {
    DockerExplorerView explorer = new DockerExplorerView();
    getConnection().openImageSearchDialog(IMAGE_NAME, null, REGISTRY_URL);
    ImageSearchPage pageOne = new ImageSearchPage(explorer);
    pageOne.searchImage();
    assertFalse("Search result is empty!", pageOne.getSearchResults().isEmpty());
    assertTrue("Search result do not contains image:" + EXPECTED_IMAGE_NAME + "!", pageOne.searchResultsContains(EXPECTED_IMAGE_NAME));
    pageOne.next();
    // new WaitUntil(new ShellIsAvailable("Progress Information"), TimePeriod.DEFAULT);
    AbstractWait.sleep(TimePeriod.getCustom(5));
    ImageTagSelectionPage pageTwo = new ImageTagSelectionPage(pageOne);
    assertFalse("Search tags are empty!", pageTwo.getTags().isEmpty());
    new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
    if (!pageTwo.tagsContains(IMAGE_TAG)) {
        pageTwo.cancel();
        new CancelButton().click();
        fail("Search results do not contain tag: " + IMAGE_TAG + "!");
    }
    pageTwo.selectTag(IMAGE_TAG);
    pageTwo.finish();
    new PushButton("Finish").click();
    new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG);
}
Also used : DockerExplorerView(org.eclipse.linuxtools.docker.reddeer.ui.DockerExplorerView) ImageSearchPage(org.eclipse.linuxtools.docker.reddeer.core.ui.wizards.ImageSearchPage) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) ImageTagSelectionPage(org.eclipse.linuxtools.docker.reddeer.core.ui.wizards.ImageTagSelectionPage) CancelButton(org.eclipse.reddeer.swt.impl.button.CancelButton) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton) Test(org.junit.Test) AbstractImageBotTest(org.eclipse.linuxtools.docker.integration.tests.image.AbstractImageBotTest)

Example 17 with JobIsRunning

use of org.eclipse.reddeer.workbench.core.condition.JobIsRunning in project linuxtools by eclipse.

the class ImageRunNetworkPage method finish.

public void finish() {
    if (new FinishButton().isEnabled()) {
        new FinishButton().click();
        new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG);
    } else {
        throw new RuntimeException("Image cannot be run! (Duplicate name?)");
    }
}
Also used : FinishButton(org.eclipse.reddeer.swt.impl.button.FinishButton) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning)

Example 18 with JobIsRunning

use of org.eclipse.reddeer.workbench.core.condition.JobIsRunning in project linuxtools by eclipse.

the class ImageRunSelectionPage method finish.

public void finish() {
    if (new FinishButton().isEnabled()) {
        new FinishButton().click();
        new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG);
    } else {
        throw new RuntimeException("Image cannot be run! (Duplicate name?)");
    }
}
Also used : FinishButton(org.eclipse.reddeer.swt.impl.button.FinishButton) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning)

Example 19 with JobIsRunning

use of org.eclipse.reddeer.workbench.core.condition.JobIsRunning in project linuxtools by eclipse.

the class ImageSearchPage method searchImage.

public void searchImage() {
    new PushButton("Search").click();
    new WaitWhile(new JobIsRunning(), TimePeriod.DEFAULT);
}
Also used : WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton)

Example 20 with JobIsRunning

use of org.eclipse.reddeer.workbench.core.condition.JobIsRunning in project linuxtools by eclipse.

the class ImageSearchPage method finish.

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

Aggregations

JobIsRunning (org.eclipse.reddeer.workbench.core.condition.JobIsRunning)154 WaitWhile (org.eclipse.reddeer.common.wait.WaitWhile)142 WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)62 ShellIsAvailable (org.eclipse.reddeer.swt.condition.ShellIsAvailable)52 DefaultShell (org.eclipse.reddeer.swt.impl.shell.DefaultShell)46 Test (org.junit.Test)36 FinishButton (org.eclipse.reddeer.swt.impl.button.FinishButton)31 ContextMenuItem (org.eclipse.reddeer.swt.impl.menu.ContextMenuItem)29 PushButton (org.eclipse.reddeer.swt.impl.button.PushButton)28 OkButton (org.eclipse.reddeer.swt.impl.button.OkButton)23 ControlIsEnabled (org.eclipse.reddeer.swt.condition.ControlIsEnabled)19 WaitTimeoutExpiredException (org.eclipse.reddeer.common.exception.WaitTimeoutExpiredException)18 LabeledText (org.eclipse.reddeer.swt.impl.text.LabeledText)18 OpenShiftExplorerView (org.jboss.tools.openshift.reddeer.view.OpenShiftExplorerView)17 DockerImagesTab (org.eclipse.linuxtools.docker.reddeer.ui.DockerImagesTab)16 ImageRunSelectionPage (org.eclipse.linuxtools.docker.reddeer.core.ui.wizards.ImageRunSelectionPage)14 AbstractTest (org.jboss.tools.openshift.ui.bot.test.application.v3.basic.AbstractTest)14 CancelButton (org.eclipse.reddeer.swt.impl.button.CancelButton)13 AbstractImageBotTest (org.eclipse.linuxtools.docker.integration.tests.image.AbstractImageBotTest)12 NextButton (org.eclipse.reddeer.swt.impl.button.NextButton)10