Search in sources :

Example 26 with TreeItem

use of org.eclipse.reddeer.swt.api.TreeItem in project jbosstools-openshift by jbosstools.

the class ResourcesTest method testResourcesExistence.

@Test
public void testResourcesExistence() {
    OpenShiftExplorerView explorer = new OpenShiftExplorerView();
    explorer.open();
    OpenShiftProject project = explorer.getOpenShift3Connection(connectionReq.getConnection()).getProject(DatastoreOS3.TEST_PROJECT);
    project.expand();
    TreeItem projectItem = project.getTreeItem();
    verifyResourceExistence(projectItem, Resource.BUILD_CONFIG);
    verifyResourceExistence(projectItem, Resource.BUILD);
    verifyResourceExistence(projectItem, Resource.DEPLOYMENT_CONFIG);
    verifyResourceExistence(projectItem, Resource.IMAGE_STREAM);
    verifyResourceExistence(projectItem, Resource.POD);
    verifyResourceExistence(projectItem, Resource.ROUTE);
    verifyResourceExistence(projectItem, Resource.SERVICE);
}
Also used : OpenShiftProject(org.jboss.tools.openshift.reddeer.view.resources.OpenShiftProject) TreeItem(org.eclipse.reddeer.swt.api.TreeItem) OpenShiftExplorerView(org.jboss.tools.openshift.reddeer.view.OpenShiftExplorerView) AbstractTest(org.jboss.tools.openshift.ui.bot.test.application.v3.basic.AbstractTest) Test(org.junit.Test)

Example 27 with TreeItem

use of org.eclipse.reddeer.swt.api.TreeItem in project jbosstools-hibernate by jbosstools.

the class HibernateRedDeerTest method deleteHibernateConfigurations.

private static void deleteHibernateConfigurations() {
    KnownConfigurationsView v = new KnownConfigurationsView();
    v.open();
    while (v.getConsoleConfigurations() != null && !v.getConsoleConfigurations().isEmpty()) {
        TreeItem i = v.getConsoleConfigurations().get(0);
        i.select();
        ContextMenuItem closeConfig = new ContextMenuItem("Close Configuration");
        if (closeConfig.isEnabled()) {
            closeConfig.select();
            new WaitWhile(new JobIsRunning());
        }
        v.deleteConsoleConfiguration(i.getText());
    }
}
Also used : WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) ContextMenuItem(org.eclipse.reddeer.swt.impl.menu.ContextMenuItem) TreeItem(org.eclipse.reddeer.swt.api.TreeItem) KnownConfigurationsView(org.jboss.tools.hibernate.reddeer.console.views.KnownConfigurationsView) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning)

Aggregations

TreeItem (org.eclipse.reddeer.swt.api.TreeItem)27 WaitWhile (org.eclipse.reddeer.common.wait.WaitWhile)10 WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)9 DefaultShell (org.eclipse.reddeer.swt.impl.shell.DefaultShell)9 DefaultTreeItem (org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem)8 ShellIsAvailable (org.eclipse.reddeer.swt.condition.ShellIsAvailable)7 DefaultTree (org.eclipse.reddeer.swt.impl.tree.DefaultTree)7 WaitTimeoutExpiredException (org.eclipse.reddeer.common.exception.WaitTimeoutExpiredException)6 CoreLayerException (org.eclipse.reddeer.core.exception.CoreLayerException)6 JobIsRunning (org.eclipse.reddeer.workbench.core.condition.JobIsRunning)6 OkButton (org.eclipse.reddeer.swt.impl.button.OkButton)5 ContextMenuItem (org.eclipse.reddeer.swt.impl.menu.ContextMenuItem)5 ArrayList (java.util.ArrayList)4 ProjectExplorer (org.eclipse.reddeer.eclipse.ui.navigator.resources.ProjectExplorer)4 Shell (org.eclipse.reddeer.swt.api.Shell)4 Test (org.junit.Test)4 LaunchView (org.eclipse.reddeer.eclipse.debug.ui.views.launch.LaunchView)3 CaptureScreenshotException (org.eclipse.reddeer.junit.screenshot.CaptureScreenshotException)3 PushButton (org.eclipse.reddeer.swt.impl.button.PushButton)3 AbstractTest (org.jboss.tools.openshift.ui.bot.test.application.v3.basic.AbstractTest)3