use of org.eclipse.linuxtools.docker.reddeer.core.ui.wizards.ImageTagSelectionPage 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);
}
use of org.eclipse.linuxtools.docker.reddeer.core.ui.wizards.ImageTagSelectionPage in project linuxtools by eclipse.
the class RunDockerImageLaunchConfiguration method searchImage.
public void searchImage(String imageName, String tag) {
selectTab(MAIN_TAB_LABEL);
new PushButton("Search...");
ImageSearchPage pageOne = new ImageSearchPage(new DefaultCTabItem(MAIN_TAB_LABEL));
pageOne.searchImage(imageName);
pageOne.next();
new WaitWhile(new ShellIsActive("Progress Information"), TimePeriod.DEFAULT);
ImageTagSelectionPage pageTwo = new ImageTagSelectionPage(pageOne);
assertFalse("Search tags are empty!", pageTwo.getTags().isEmpty());
new WaitWhile(new JobIsRunning(), TimePeriod.DEFAULT);
assertTrue("Search results do not contains tag:" + tag + "!", pageTwo.tagsContains(tag));
pageTwo.selectTag(tag);
pageTwo.finish();
new DefaultShell("Pull Image");
new PushButton("Finish").click();
new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG);
}
Aggregations