use of org.eclipse.reddeer.workbench.core.condition.JobIsRunning in project jbosstools-openshift by jbosstools.
the class OpenShiftUtils method deleteAllProjects.
public static void deleteAllProjects(Connection connection) {
OpenShiftExplorerView explorer = new OpenShiftExplorerView();
explorer.getOpenShift3Connection(connection).refresh();
new WaitWhile(new JobIsRunning());
List<OpenShiftProject> projects = explorer.getOpenShift3Connection(connection).getAllProjects();
for (OpenShiftProject project : projects) {
if (project != null) {
String projectName = project.getName();
try {
project.delete();
new WaitWhile(new OpenShiftProjectExists(projectName, connection), TimePeriod.LONG);
} catch (CoreLayerException ex) {
// project does not exist - project has been deleted but view has not been
// refreshed
explorer.getOpenShift3Connection(connection).refresh();
}
}
}
}
use of org.eclipse.reddeer.workbench.core.condition.JobIsRunning in project jbosstools-openshift by jbosstools.
the class OpenShiftUtils method updateMavenProject.
public static void updateMavenProject(String projectName) {
new ProjectExplorer().getProject(projectName);
new ContextMenuItem("Maven", "Update Project...").select();
new DefaultShell("Update Maven Project");
new PushButton("Select All").click();
new PushButton("OK").click();
new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG);
}
use of org.eclipse.reddeer.workbench.core.condition.JobIsRunning in project jbosstools-openshift by jbosstools.
the class CDKLaunchConfigurationTest method setServerEditor.
@Override
public void setServerEditor() {
serversView = new CDKServersView();
serversView.open();
serversView.getServer(getServerAdapter()).open();
editor = new CDK32ServerEditor(getServerAdapter());
editor.activate();
new WaitUntil(new JobIsRunning(), TimePeriod.getCustom(1), false);
}
use of org.eclipse.reddeer.workbench.core.condition.JobIsRunning in project jbosstools-openshift by jbosstools.
the class CDKTestUtils method openNewServerWizardDialog.
public static NewCDKServerWizard openNewServerWizardDialog() {
// $NON-NLS-1$
log.info("Adding new Container Development Environment server adapter");
// call new server dialog from servers view
CDKServersView view = new CDKServersView();
view.open();
NewCDKServerWizard dialog = view.newCDKServer();
new WaitWhile(new JobIsRunning(), TimePeriod.MEDIUM, false);
return dialog;
}
use of org.eclipse.reddeer.workbench.core.condition.JobIsRunning in project jbosstools-openshift by jbosstools.
the class CDKServerWizardAbstractTest method assertServerType.
protected void assertServerType(final String serverType) {
NewCDKServerWizard wizard = (NewCDKServerWizard) CDKTestUtils.openNewServerWizardDialog();
try {
TreeItem item = new DefaultTreeItem(new String[] { SERVER_TYPE_GROUP }).getItem(serverType);
item.select();
assertTrue(item.getText().equalsIgnoreCase(serverType));
new WaitWhile(new JobIsRunning(), TimePeriod.MEDIUM, false);
} catch (CoreLayerException coreExp) {
log.error(coreExp.getMessage());
fail("Server type " + serverType + " was not found in New Server Wizard");
}
assertEquals(new LabeledText("Server's host name:").getText(), "localhost");
assertEquals(new LabeledText("Server name:").getText(), getServerAdapter());
new WaitUntil(new ControlIsEnabled(new NextButton()), TimePeriod.MEDIUM, false);
assertTrue("Dialog button Next is not enabled!", wizard.isNextEnabled());
try {
new WaitWhile(new JobIsRunning(), TimePeriod.MEDIUM, false);
new CancelButton().click();
} catch (WaitTimeoutExpiredException exc) {
exc.printStackTrace();
log.error("Dialog could not be canceled because there were unfinished jobs running after timeout" + "\n\rTrying to cancel dialog manually");
new DefaultShell("New Server").close();
}
}
Aggregations