Search in sources :

Example 16 with WaitWhile

use of org.eclipse.reddeer.common.wait.WaitWhile 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 WaitWhile

use of org.eclipse.reddeer.common.wait.WaitWhile 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 WaitWhile

use of org.eclipse.reddeer.common.wait.WaitWhile 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 WaitWhile

use of org.eclipse.reddeer.common.wait.WaitWhile 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 WaitWhile

use of org.eclipse.reddeer.common.wait.WaitWhile 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

WaitWhile (org.eclipse.reddeer.common.wait.WaitWhile)209 JobIsRunning (org.eclipse.reddeer.workbench.core.condition.JobIsRunning)142 ShellIsAvailable (org.eclipse.reddeer.swt.condition.ShellIsAvailable)97 DefaultShell (org.eclipse.reddeer.swt.impl.shell.DefaultShell)84 WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)72 PushButton (org.eclipse.reddeer.swt.impl.button.PushButton)49 OkButton (org.eclipse.reddeer.swt.impl.button.OkButton)45 Test (org.junit.Test)42 FinishButton (org.eclipse.reddeer.swt.impl.button.FinishButton)36 ContextMenuItem (org.eclipse.reddeer.swt.impl.menu.ContextMenuItem)36 ControlIsEnabled (org.eclipse.reddeer.swt.condition.ControlIsEnabled)31 LabeledText (org.eclipse.reddeer.swt.impl.text.LabeledText)30 WaitTimeoutExpiredException (org.eclipse.reddeer.common.exception.WaitTimeoutExpiredException)24 OpenShiftExplorerView (org.jboss.tools.openshift.reddeer.view.OpenShiftExplorerView)22 CancelButton (org.eclipse.reddeer.swt.impl.button.CancelButton)19 AbstractTest (org.jboss.tools.openshift.ui.bot.test.application.v3.basic.AbstractTest)19 Shell (org.eclipse.reddeer.swt.api.Shell)17 DefaultTable (org.eclipse.reddeer.swt.impl.table.DefaultTable)17 DockerImagesTab (org.eclipse.linuxtools.docker.reddeer.ui.DockerImagesTab)16 DefaultTreeItem (org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem)16