Search in sources :

Example 1 with TreeContainsItem

use of org.eclipse.reddeer.swt.condition.TreeContainsItem in project jbosstools-openshift by jbosstools.

the class DeployDockerImageTest method pullHelloImageIfDoesNotExist.

/**
 * If hello world docker image does not exist, this method will pull it.
 */
private static void pullHelloImageIfDoesNotExist() {
    DockerExplorerView dockerExplorer = new DockerExplorerView();
    DockerConnection dockerConnection = dockerExplorer.getDockerConnectionByName(DOCKER_CONNECTION);
    dockerConnection.getTreeItem().expand();
    new WaitWhile(new JobIsRunning());
    new WaitWhile(new TreeContainsItem(dockerConnection.getTreeItem().getParent(), dockerConnection.getTreeItem().getText(), "Loading..."), TimePeriod.LONG);
    if (dockerConnection.getImage(HELLO_OS_DOCKER_IMAGE, TAG) == null) {
        dockerConnection.pullImage(HELLO_OS_DOCKER_IMAGE, TAG);
    }
}
Also used : DockerConnection(org.eclipse.linuxtools.docker.reddeer.ui.resources.DockerConnection) DockerExplorerView(org.eclipse.linuxtools.docker.reddeer.ui.DockerExplorerView) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) TreeContainsItem(org.eclipse.reddeer.swt.condition.TreeContainsItem) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning)

Example 2 with TreeContainsItem

use of org.eclipse.reddeer.swt.condition.TreeContainsItem in project jbosstools-hibernate by jbosstools.

the class ReverseEngineeringEditor method selectAllTables.

/**
 * Select all tables within Add Tables & Columns tab
 */
public void selectAllTables(String databaseName) {
    activateTableAndColumnsTab();
    new PushButton(this, "Add...").click();
    Shell s = new DefaultShell("Add Tables & Columns");
    DefaultTree dbTree = new DefaultTree(s);
    new WaitUntil(new TreeHasChildren(dbTree));
    new WaitUntil(new TreeContainsItem(dbTree, databaseName));
    new DefaultTreeItem(dbTree, databaseName).select();
    new PushButton(s, "Select all children").click();
    new PushButton(s, "OK").click();
    new WaitWhile(new ShellIsAvailable(s));
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) DefaultTree(org.eclipse.reddeer.swt.impl.tree.DefaultTree) 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) DefaultTreeItem(org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem) TreeHasChildren(org.eclipse.reddeer.swt.condition.TreeHasChildren) TreeContainsItem(org.eclipse.reddeer.swt.condition.TreeContainsItem) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil)

Aggregations

WaitWhile (org.eclipse.reddeer.common.wait.WaitWhile)2 TreeContainsItem (org.eclipse.reddeer.swt.condition.TreeContainsItem)2 DockerExplorerView (org.eclipse.linuxtools.docker.reddeer.ui.DockerExplorerView)1 DockerConnection (org.eclipse.linuxtools.docker.reddeer.ui.resources.DockerConnection)1 WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)1 Shell (org.eclipse.reddeer.swt.api.Shell)1 ShellIsAvailable (org.eclipse.reddeer.swt.condition.ShellIsAvailable)1 TreeHasChildren (org.eclipse.reddeer.swt.condition.TreeHasChildren)1 PushButton (org.eclipse.reddeer.swt.impl.button.PushButton)1 DefaultShell (org.eclipse.reddeer.swt.impl.shell.DefaultShell)1 DefaultTree (org.eclipse.reddeer.swt.impl.tree.DefaultTree)1 DefaultTreeItem (org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem)1 JobIsRunning (org.eclipse.reddeer.workbench.core.condition.JobIsRunning)1