Search in sources :

Example 1 with SuspendedTreeItemIsReady

use of org.jboss.tools.openshift.ui.bot.test.application.v3.adapter.condition.SuspendedTreeItemIsReady in project jbosstools-openshift by jbosstools.

the class DebuggingEAPAppTest method getSuspendedThreadTreeItem.

private TreeItem getSuspendedThreadTreeItem(LaunchView debugView) {
    // get top item
    debugView.activate();
    DefaultTree parent = new DefaultTree();
    TreeItem remoteDebuggerTreeItem = parent.getItems().stream().filter(containsStringPredicate("Remote debugger")).findFirst().get();
    List<TreeItem> items = remoteDebuggerTreeItem.getItems();
    TreeItem openJDKTreeItem = items.get(0);
    // this could (and will) change when run with another JDK - need
    // investigation
    assertTrue(openJDKTreeItem.getText().contains("OpenJDK"));
    // wait until we can see the suspended thread
    SuspendedTreeItemIsReady suspendedTreeItemIsReady = new SuspendedTreeItemIsReady(openJDKTreeItem);
    new WaitUntil(suspendedTreeItemIsReady, TimePeriod.VERY_LONG);
    return suspendedTreeItemIsReady.getSuspendedTreeItem();
}
Also used : DefaultTree(org.eclipse.reddeer.swt.impl.tree.DefaultTree) TreeItem(org.eclipse.reddeer.swt.api.TreeItem) DefaultTreeItem(org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem) SuspendedTreeItemIsReady(org.jboss.tools.openshift.ui.bot.test.application.v3.adapter.condition.SuspendedTreeItemIsReady) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil)

Aggregations

WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)1 TreeItem (org.eclipse.reddeer.swt.api.TreeItem)1 DefaultTree (org.eclipse.reddeer.swt.impl.tree.DefaultTree)1 DefaultTreeItem (org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem)1 SuspendedTreeItemIsReady (org.jboss.tools.openshift.ui.bot.test.application.v3.adapter.condition.SuspendedTreeItemIsReady)1