Search in sources :

Example 11 with OpenShiftProject

use of org.jboss.tools.openshift.reddeer.view.resources.OpenShiftProject 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 12 with OpenShiftProject

use of org.jboss.tools.openshift.reddeer.view.resources.OpenShiftProject in project jbosstools-openshift by jbosstools.

the class OpenShiftUtils method getOpenShiftProject.

public static OpenShiftProject getOpenShiftProject(String projectName, Connection connection) {
    OpenShiftExplorerView explorer = new OpenShiftExplorerView();
    OpenShiftProject project = explorer.getOpenShift3Connection(connection).getProject(projectName);
    assertThat("Could not find project " + projectName + " in OpenShift Explorer", project, notNullValue());
    project.expand();
    return project;
}
Also used : OpenShiftProject(org.jboss.tools.openshift.reddeer.view.resources.OpenShiftProject) OpenShiftExplorerView(org.jboss.tools.openshift.reddeer.view.OpenShiftExplorerView)

Aggregations

OpenShiftProject (org.jboss.tools.openshift.reddeer.view.resources.OpenShiftProject)12 OpenShiftExplorerView (org.jboss.tools.openshift.reddeer.view.OpenShiftExplorerView)11 WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)5 JobIsRunning (org.eclipse.reddeer.workbench.core.condition.JobIsRunning)5 WaitWhile (org.eclipse.reddeer.common.wait.WaitWhile)4 OpenShiftResourceExists (org.jboss.tools.openshift.reddeer.condition.OpenShiftResourceExists)4 DeleteResourcesWizard (org.jboss.tools.openshift.reddeer.wizard.v3.DeleteResourcesWizard)3 AbstractTest (org.jboss.tools.openshift.ui.bot.test.application.v3.basic.AbstractTest)3 Test (org.junit.Test)3 RedDeerException (org.eclipse.reddeer.common.exception.RedDeerException)2 TableItem (org.eclipse.reddeer.swt.api.TableItem)2 OpenShift3Connection (org.jboss.tools.openshift.reddeer.view.resources.OpenShift3Connection)2 OpenShiftResource (org.jboss.tools.openshift.reddeer.view.resources.OpenShiftResource)2 IReplicationController (com.openshift.restclient.model.IReplicationController)1 AbstractWaitCondition (org.eclipse.reddeer.common.condition.AbstractWaitCondition)1 CoreLayerException (org.eclipse.reddeer.core.exception.CoreLayerException)1 WithTextMatcher (org.eclipse.reddeer.core.matcher.WithTextMatcher)1 ProjectExplorer (org.eclipse.reddeer.eclipse.ui.navigator.resources.ProjectExplorer)1 TreeItem (org.eclipse.reddeer.swt.api.TreeItem)1 ControlIsEnabled (org.eclipse.reddeer.swt.condition.ControlIsEnabled)1