Search in sources :

Example 1 with ApplicationPodIsRunning

use of org.jboss.tools.openshift.reddeer.condition.ApplicationPodIsRunning in project jbosstools-openshift by jbosstools.

the class PublishChangesTest method waitForRunningApplication.

@BeforeClass
public static void waitForRunningApplication() {
    new ProjectExplorer().deleteAllProjects(true);
    new WaitUntil(new OpenShiftResourceExists(Resource.BUILD, "eap-app-1", ResourceState.COMPLETE, projectReq.getProjectName(), connectionReq.getConnection()), TimePeriod.getCustom(1000));
    OpenShiftExplorerView openShiftExplorerView = new OpenShiftExplorerView();
    OpenShiftProject project = openShiftExplorerView.getOpenShift3Connection(connectionReq.getConnection()).getProject(projectReq.getProjectName());
    new WaitUntil(new ApplicationPodIsRunning(project), TimePeriod.LONG);
    cloneGitRepoAndImportProject();
}
Also used : ProjectExplorer(org.eclipse.reddeer.eclipse.ui.navigator.resources.ProjectExplorer) ApplicationPodIsRunning(org.jboss.tools.openshift.reddeer.condition.ApplicationPodIsRunning) OpenShiftProject(org.jboss.tools.openshift.reddeer.view.resources.OpenShiftProject) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil) OpenShiftExplorerView(org.jboss.tools.openshift.reddeer.view.OpenShiftExplorerView) OpenShiftResourceExists(org.jboss.tools.openshift.reddeer.condition.OpenShiftResourceExists) BeforeClass(org.junit.BeforeClass)

Example 2 with ApplicationPodIsRunning

use of org.jboss.tools.openshift.reddeer.condition.ApplicationPodIsRunning in project jbosstools-openshift by jbosstools.

the class PortForwardingTest method openPortForwardingDialog.

private void openPortForwardingDialog() {
    OpenShift3Connection openShift3Connection = new OpenShiftExplorerView().getOpenShift3Connection(connectionReq.getConnection());
    ApplicationPodIsRunning applicationPodIsRunning = new ApplicationPodIsRunning(openShift3Connection.getProject(projectReq.getProjectName()));
    new WaitUntil(applicationPodIsRunning, TimePeriod.LONG);
    openShift3Connection.getProject(projectReq.getProjectName()).getOpenShiftResource(Resource.POD, applicationPodIsRunning.getApplicationPodName()).select();
    new ContextMenuItem(OpenShiftLabel.ContextMenu.PORT_FORWARD).select();
    new DefaultShell(OpenShiftLabel.Shell.APPLICATION_PORT_FORWARDING);
}
Also used : ApplicationPodIsRunning(org.jboss.tools.openshift.reddeer.condition.ApplicationPodIsRunning) ContextMenuItem(org.eclipse.reddeer.swt.impl.menu.ContextMenuItem) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil) OpenShiftExplorerView(org.jboss.tools.openshift.reddeer.view.OpenShiftExplorerView) OpenShift3Connection(org.jboss.tools.openshift.reddeer.view.resources.OpenShift3Connection)

Aggregations

WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)2 ApplicationPodIsRunning (org.jboss.tools.openshift.reddeer.condition.ApplicationPodIsRunning)2 OpenShiftExplorerView (org.jboss.tools.openshift.reddeer.view.OpenShiftExplorerView)2 ProjectExplorer (org.eclipse.reddeer.eclipse.ui.navigator.resources.ProjectExplorer)1 ContextMenuItem (org.eclipse.reddeer.swt.impl.menu.ContextMenuItem)1 DefaultShell (org.eclipse.reddeer.swt.impl.shell.DefaultShell)1 OpenShiftResourceExists (org.jboss.tools.openshift.reddeer.condition.OpenShiftResourceExists)1 OpenShift3Connection (org.jboss.tools.openshift.reddeer.view.resources.OpenShift3Connection)1 OpenShiftProject (org.jboss.tools.openshift.reddeer.view.resources.OpenShiftProject)1 BeforeClass (org.junit.BeforeClass)1