Search in sources :

Example 6 with OpenShift3Connection

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

the class CreateNewProjectTest method testCreateNewProjectViaContextMenu.

@Test
public void testCreateNewProjectViaContextMenu() {
    OpenShiftExplorerView explorer = new OpenShiftExplorerView();
    explorer.reopen();
    OpenShift3Connection connection = explorer.getOpenShift3Connection(connectionReq.getConnection());
    try {
        connection.createNewProject2();
    } catch (RedDeerException ex) {
        fail("OpenShift project created for a connection has not been shown in OpenShift explorer.\n" + ex.getMessage());
    }
}
Also used : RedDeerException(org.eclipse.reddeer.common.exception.RedDeerException) OpenShiftExplorerView(org.jboss.tools.openshift.reddeer.view.OpenShiftExplorerView) OpenShift3Connection(org.jboss.tools.openshift.reddeer.view.resources.OpenShift3Connection) AbstractTest(org.jboss.tools.openshift.ui.bot.test.application.v3.basic.AbstractTest) Test(org.junit.Test)

Example 7 with OpenShift3Connection

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

the class DeleteProjectTest method testDeleteProjectViaContextMenu.

@Test
public void testDeleteProjectViaContextMenu() {
    projectExists = true;
    OpenShiftExplorerView explorer = new OpenShiftExplorerView();
    explorer.open();
    OpenShift3Connection connection = explorer.getOpenShift3Connection(connectionReq.getConnection());
    connection.getProject(PROJECT_NAME).delete();
    projectExists = false;
    assertFalse("Project is still presented in OpenShift explorer under a connection.", connection.projectExists(PROJECT_NAME));
}
Also used : OpenShiftExplorerView(org.jboss.tools.openshift.reddeer.view.OpenShiftExplorerView) OpenShift3Connection(org.jboss.tools.openshift.reddeer.view.resources.OpenShift3Connection) AbstractTest(org.jboss.tools.openshift.ui.bot.test.application.v3.basic.AbstractTest) Test(org.junit.Test)

Example 8 with OpenShift3Connection

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

the class ProjectNameValidationTest method openNewProjectShell.

private void openNewProjectShell() {
    OpenShiftExplorerView explorer = new OpenShiftExplorerView();
    explorer.reopen();
    OpenShift3Connection connection = explorer.getOpenShift3Connection(connectionReq.getConnection());
    connection.select();
    new ContextMenuItem(OpenShiftLabel.ContextMenu.NEW_OS_PROJECT).select();
    new DefaultShell(OpenShiftLabel.Shell.CREATE_OS_PROJECT);
}
Also used : ContextMenuItem(org.eclipse.reddeer.swt.impl.menu.ContextMenuItem) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) OpenShiftExplorerView(org.jboss.tools.openshift.reddeer.view.OpenShiftExplorerView) OpenShift3Connection(org.jboss.tools.openshift.reddeer.view.resources.OpenShift3Connection)

Example 9 with OpenShift3Connection

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

the class DeployDockerImageTest method createProjects.

private static void createProjects() {
    OpenShiftExplorerView explorer = new OpenShiftExplorerView();
    explorer.open();
    OpenShift3Connection connection = explorer.getOpenShift3Connection(openshiftConnectionRequirement.getConnection());
    connection.createNewProject(PROJECT1);
    connection.createNewProject(PROJECT2);
}
Also used : OpenShiftExplorerView(org.jboss.tools.openshift.reddeer.view.OpenShiftExplorerView) OpenShift3Connection(org.jboss.tools.openshift.reddeer.view.resources.OpenShift3Connection)

Example 10 with OpenShift3Connection

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

the class ProjectPropertiesTest method setUp.

@Before
public void setUp() {
    OpenShiftExplorerView explorer = new OpenShiftExplorerView();
    explorer.open();
    OpenShift3Connection connection = explorer.getOpenShift3Connection(connectionReq.getConnection());
    project = connection.getProject(DatastoreOS3.TEST_PROJECT);
    project.select();
    project.openProperties();
    propertiesView = new PropertySheet();
}
Also used : PropertySheet(org.eclipse.reddeer.eclipse.ui.views.properties.PropertySheet) OpenShiftExplorerView(org.jboss.tools.openshift.reddeer.view.OpenShiftExplorerView) OpenShift3Connection(org.jboss.tools.openshift.reddeer.view.resources.OpenShift3Connection) Before(org.junit.Before)

Aggregations

OpenShift3Connection (org.jboss.tools.openshift.reddeer.view.resources.OpenShift3Connection)21 OpenShiftExplorerView (org.jboss.tools.openshift.reddeer.view.OpenShiftExplorerView)19 WaitWhile (org.eclipse.reddeer.common.wait.WaitWhile)8 WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)7 ContextMenuItem (org.eclipse.reddeer.swt.impl.menu.ContextMenuItem)7 DefaultShell (org.eclipse.reddeer.swt.impl.shell.DefaultShell)7 Test (org.junit.Test)7 WaitTimeoutExpiredException (org.eclipse.reddeer.common.exception.WaitTimeoutExpiredException)5 ShellIsAvailable (org.eclipse.reddeer.swt.condition.ShellIsAvailable)5 JobIsRunning (org.eclipse.reddeer.workbench.core.condition.JobIsRunning)5 AbstractTest (org.jboss.tools.openshift.ui.bot.test.application.v3.basic.AbstractTest)5 RedDeerException (org.eclipse.reddeer.common.exception.RedDeerException)3 LabeledText (org.eclipse.reddeer.swt.impl.text.LabeledText)3 After (org.junit.After)3 ProjectExplorer (org.eclipse.reddeer.eclipse.ui.navigator.resources.ProjectExplorer)2 PropertySheet (org.eclipse.reddeer.eclipse.ui.views.properties.PropertySheet)2 ControlIsEnabled (org.eclipse.reddeer.swt.condition.ControlIsEnabled)2 FinishButton (org.eclipse.reddeer.swt.impl.button.FinishButton)2 OkButton (org.eclipse.reddeer.swt.impl.button.OkButton)2 PushButton (org.eclipse.reddeer.swt.impl.button.PushButton)2