use of org.jboss.tools.openshift.reddeer.view.OpenShiftExplorerView in project jbosstools-openshift by jbosstools.
the class CreateNewConnectionTest method openConnectionWizardAndSetDefaultServer.
private void openConnectionWizardAndSetDefaultServer() {
OpenShiftExplorerView openShiftExplorerView = new OpenShiftExplorerView();
openShiftExplorerView.open();
openShiftExplorerView.openConnectionShell();
new DefaultShell(OpenShiftLabel.Shell.NEW_CONNECTION);
new LabeledCombo(OpenShiftLabel.TextLabels.SERVER_TYPE).setSelection(OpenShiftLabel.Others.OPENSHIFT3);
new LabeledCombo(OpenShiftLabel.TextLabels.SERVER).setText(DatastoreOS3.SERVER);
}
use of org.jboss.tools.openshift.reddeer.view.OpenShiftExplorerView in project jbosstools-openshift by jbosstools.
the class ConnectionPropertiesTest method testConnectionProperties.
@Test
public void testConnectionProperties() {
OpenShiftExplorerView explorer = new OpenShiftExplorerView();
explorer.open();
OpenShift3Connection connection = explorer.getOpenShift3Connection(connectionReq.getConnection());
connection.select();
new ContextMenuItem(OpenShiftLabel.ContextMenu.PROPERTIES).select();
PropertySheet propertiesView = new PropertySheet();
propertiesView.activate();
assertEquals("Property host is not valid. Was '" + propertiesView.getProperty(PROPERTY_HOST).getPropertyValue() + "' but was expected '" + DatastoreOS3.SERVER + "'", DatastoreOS3.SERVER, propertiesView.getProperty(PROPERTY_HOST).getPropertyValue());
if (DatastoreOS3.AUTH_METHOD.equals(AuthenticationMethod.BASIC)) {
assertEquals("Property user name is not valid. Was '" + propertiesView.getProperty(PROPERTY_USERNAME).getPropertyValue() + "' but was expected '" + DatastoreOS3.USERNAME + "'", DatastoreOS3.USERNAME, propertiesView.getProperty(PROPERTY_USERNAME).getPropertyValue());
} else {
assertEquals("Property user name is not valid. Was '" + propertiesView.getProperty(PROPERTY_USERNAME).getPropertyValue() + "' but was expected '" + connectionReq.getConnection().getUsername() + "'", connectionReq.getConnection().getUsername(), propertiesView.getProperty(PROPERTY_USERNAME).getPropertyValue());
}
}
use of org.jboss.tools.openshift.reddeer.view.OpenShiftExplorerView in project jbosstools-openshift by jbosstools.
the class OpenShiftUtils method getOpenShiftPod.
public static OpenShiftResource getOpenShiftPod(String projectName, Resource resource, Matcher<String> matcher, Connection connection) {
assertTrue(!StringUtils.isBlank(projectName));
OpenShiftExplorerView explorer = new OpenShiftExplorerView();
List<OpenShiftResource> pods = explorer.getOpenShift3Connection(connection).getProject(projectName).getOpenShiftResources(resource);
for (OpenShiftResource pod : pods) {
if (matcher.matches(pod.getName())) {
return pod;
}
}
fail("Pod with matcher:" + matcher.toString() + " for project " + projectName + " was not found");
return null;
}
use of org.jboss.tools.openshift.reddeer.view.OpenShiftExplorerView 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;
}
Aggregations