use of org.eclipse.reddeer.swt.impl.menu.ContextMenuItem in project jbosstools-openshift by jbosstools.
the class RemoveConnectionTest method testRemoveConnection.
@Test
public void testRemoveConnection() {
explorer.open();
explorer.getOpenShift3Connection(connectionReq.getConnection()).select();
new ContextMenuItem(OpenShiftLabel.ContextMenu.DELETE_CONNECTION).select();
new DefaultShell(OpenShiftLabel.Shell.REMOVE_CONNECTION);
new OkButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.REMOVE_CONNECTION), TimePeriod.LONG);
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
assertFalse("Connection is still presented in OpenShift explorer", explorer.connectionExists(connectionReq.getConnection().getUsername(), DatastoreOS3.SERVER));
}
use of org.eclipse.reddeer.swt.impl.menu.ContextMenuItem 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.eclipse.reddeer.swt.impl.menu.ContextMenuItem in project jbosstools-openshift by jbosstools.
the class DeployDockerImageTest method testDeployDockerImageFromOpenShiftExplorer.
@Test
public void testDeployDockerImageFromOpenShiftExplorer() {
selectProject(PROJECT2);
new ContextMenuItem(OpenShiftLabel.ContextMenu.DEPLOY_DOCKER_IMAGE).select();
new DefaultShell(OpenShiftLabel.Shell.DEPLOY_IMAGE_TO_OPENSHIFT);
new LabeledText(OpenShiftLabel.TextLabels.IMAGE_NAME).setText(HELLO_OS_DOCKER_IMAGE + ":" + TAG);
proceedThroughDeployImageToOpenShiftWizard();
verifyDeployedHelloWorldDockerImage(PROJECT2);
}
use of org.eclipse.reddeer.swt.impl.menu.ContextMenuItem in project jbosstools-openshift by jbosstools.
the class DeployDockerImageTest method assertDockerImageIsProcessedCorrectlyWhenUsedFromOpenShiftExplorer.
/**
* Selects project in OpenShift explorer view, open Deploy Image to OpenShift wizard
* from its context menu and assert that there are correct values.
* @param projectName
* @param projectDisplayName
*/
private void assertDockerImageIsProcessedCorrectlyWhenUsedFromOpenShiftExplorer(String projectName) {
selectProject(projectName);
new ContextMenuItem(OpenShiftLabel.ContextMenu.DEPLOY_DOCKER_IMAGE).select();
new DefaultShell(OpenShiftLabel.Shell.DEPLOY_IMAGE_TO_OPENSHIFT);
assertFalse("No project has been preselected.", new LabeledCombo("OpenShift Project: ").getSelection().equals(""));
assertTrue("Wrong project has been preselected.", new LabeledCombo("OpenShift Project: ").getSelection().equals(projectName));
closeWizard();
}
use of org.eclipse.reddeer.swt.impl.menu.ContextMenuItem in project jbosstools-openshift by jbosstools.
the class OpenShift3Connection method editConnection.
public OpenShift3ConnectionWizard editConnection() {
activateOpenShiftExplorerView();
new ContextMenuItem(getTreeItem(), OpenShiftLabel.ContextMenu.EDIT_CONNECTION).select();
return new OpenShift3ConnectionWizard(OpenShiftLabel.Shell.EDIT_CONNECTION);
}
Aggregations