use of org.eclipse.reddeer.swt.impl.menu.ContextMenuItem in project jbosstools-openshift by jbosstools.
the class AbstractOpenShiftExplorerItem method refresh.
public void refresh() {
select();
new ContextMenuItem(OpenShiftLabel.ContextMenu.REFRESH).select();
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
}
use of org.eclipse.reddeer.swt.impl.menu.ContextMenuItem in project jbosstools-openshift by jbosstools.
the class Service method createServerAdapter.
/**
* Creates server adapter for this service with default values.
*/
public void createServerAdapter() {
select();
new ContextMenuItem(OpenShiftLabel.ContextMenu.NEW_ADAPTER_FROM_EXPLORER).select();
new DefaultShell(OpenShiftLabel.Shell.SERVER_ADAPTER_SETTINGS);
new FinishButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.SERVER_ADAPTER_SETTINGS));
new WaitUntil(new JobIsKilled("Refreshing server adapter list"), TimePeriod.LONG, false);
new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG);
}
use of org.eclipse.reddeer.swt.impl.menu.ContextMenuItem in project jbosstools-openshift by jbosstools.
the class AbstractOpenShiftConnection method remove.
/**
* Removes connection from OpenShift explorer view.
*/
public void remove() {
item.select();
new ContextMenuItem(OpenShiftLabel.ContextMenu.DELETE_CONNECTION).select();
new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.REMOVE_CONNECTION));
new DefaultShell(OpenShiftLabel.Shell.REMOVE_CONNECTION);
new OkButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.REMOVE_CONNECTION));
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
}
use of org.eclipse.reddeer.swt.impl.menu.ContextMenuItem in project jbosstools-openshift by jbosstools.
the class TriggerBuildTest method testCloneExistingBuild.
@Test
public void testCloneExistingBuild() {
OpenShiftExplorerView explorer = new OpenShiftExplorerView();
explorer.reopen();
new WaitUntil(new OpenShiftResourceExists(Resource.BUILD, (Matcher<String>) null, ResourceState.UNSPECIFIED, projectReq.getProjectName(), connectionReq.getConnection()), TimePeriod.getCustom(240), true);
List<OpenShiftResource> builds = explorer.getOpenShift3Connection(connectionReq.getConnection()).getProject(projectReq.getProjectName()).getOpenShiftResources(Resource.BUILD);
builds.get(0).select();
new ContextMenuItem(OpenShiftLabel.ContextMenu.CLONE_BUILD).select();
int oldAmountOfBuilds = builds.size();
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
try {
new WaitUntil(new AmountOfResourcesExists(Resource.BUILD, oldAmountOfBuilds + 1, projectReq.getProjectName(), connectionReq.getConnection()), TimePeriod.LONG);
} catch (WaitTimeoutExpiredException ex) {
fail("New build was not triggered altough it should be.");
}
}
use of org.eclipse.reddeer.swt.impl.menu.ContextMenuItem in project jbosstools-openshift by jbosstools.
the class ScalingTest method scaleTo.
private void scaleTo(int amountOfPods) {
new ContextMenuItem(OpenShiftLabel.ContextMenu.SCALE_TO).select();
new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.SCALE_DEPLOYMENTS));
new DefaultShell(OpenShiftLabel.Shell.SCALE_DEPLOYMENTS).setFocus();
new WaitWhile(new ControlIsEnabled(new OkButton()));
new DefaultSpinner().setValue(amountOfPods);
new WaitUntil(new ControlIsEnabled(new OkButton()));
new OkButton().click();
}
Aggregations