use of org.eclipse.reddeer.swt.impl.menu.ContextMenuItem in project jbosstools-openshift by jbosstools.
the class ImportApplicationWizardGitTest method testNoRepoRemote.
@Test
public void testNoRepoRemote() {
createRepo();
service.select();
new ContextMenuItem(OpenShiftLabel.ContextMenu.IMPORT_APPLICATION).select();
new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.IMPORT_APPLICATION));
ImportApplicationWizard importWizard = new ImportApplicationWizard();
assertProjectExistsErrorInWizard(importWizard);
GitCloningWizardPage gitCloningWizardPage = new GitCloningWizardPage();
gitCloningWizardPage.useExistingRepository(true);
assertGitRemoteErrorInWizzard(importWizard);
importWizard.cancel();
}
use of org.eclipse.reddeer.swt.impl.menu.ContextMenuItem in project jbosstools-openshift by jbosstools.
the class CreateServerAdapterTest method testCreateOpenShift3ServerAdapterViaServersView.
@Test
public void testCreateOpenShift3ServerAdapterViaServersView() {
ServersView2 serversView = new ServersView2();
serversView.open();
new ContextMenuItem(OpenShiftLabel.ContextMenu.NEW_SERVER).select();
new DefaultShell(OpenShiftLabel.Shell.ADAPTER);
new DefaultTreeItem(OpenShiftLabel.Others.OS3_SERVER_ADAPTER).select();
next();
next();
setAdapterDetailsAndCreateAdapterAndVerifyExistence();
}
use of org.eclipse.reddeer.swt.impl.menu.ContextMenuItem in project jbosstools-openshift by jbosstools.
the class DeploymentTest method testDeploymentOfApplicationCreatedFromTemplate.
@Test
public void testDeploymentOfApplicationCreatedFromTemplate() {
OpenShiftExplorerView explorer = new OpenShiftExplorerView();
new WaitUntil(new OpenShiftResourceExists(Resource.BUILD, "eap-app-1", ResourceState.UNSPECIFIED, projectReq.getProjectName(), connectionReq.getConnection()), TimePeriod.DEFAULT, false);
try {
new WaitUntil(new OpenShiftResourceExists(Resource.BUILD, "eap-app-1", ResourceState.COMPLETE, projectReq.getProjectName(), connectionReq.getConnection()), TimePeriod.getCustom(600), true);
} catch (WaitTimeoutExpiredException ex) {
fail("There should be a successful build of an application, but there is not.");
}
try {
new WaitUntil(new AmountOfResourcesExists(Resource.POD, 2, projectReq.getProjectName(), connectionReq.getConnection()), TimePeriod.getCustom(60), true);
} catch (WaitTimeoutExpiredException ex) {
fail("There should be precisely 2 pods. One of the build and one of an running application.");
}
explorer.getOpenShift3Connection(connectionReq.getConnection()).getProject(projectReq.getProjectName()).getOpenShiftResources(Resource.ROUTE).get(0).select();
new ContextMenuItem(OpenShiftLabel.ContextMenu.SHOW_IN_WEB_BROWSER).select();
try {
new WaitUntil(new BrowserContainsText("Hello World!"), TimePeriod.VERY_LONG);
new BrowserEditor("helloworld").close();
} catch (WaitTimeoutExpiredException ex) {
fail("Application was not deployed successfully because it is not shown in web browser properly.\n" + ex.getMessage());
}
}
use of org.eclipse.reddeer.swt.impl.menu.ContextMenuItem in project jbosstools-openshift by jbosstools.
the class DebuggingEAPAppTest method rebuildProject.
private static void rebuildProject() {
PackageExplorerPart pexplorer = new PackageExplorerPart();
pexplorer.open();
pexplorer.getProject(PROJECT_NAME).select();
new ContextMenuItem("Maven", "Update Project...").select();
new WaitUntil(new ShellIsAvailable("Update Maven Project"), TimePeriod.LONG);
new CheckBox("Force Update of Snapshots/Releases").toggle(true);
new PushButton("OK").click();
new WaitWhile(new ShellIsAvailable("Update Maven Project"), TimePeriod.DEFAULT);
new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG);
}
use of org.eclipse.reddeer.swt.impl.menu.ContextMenuItem in project jbosstools-openshift by jbosstools.
the class CDKServer method operateServerState.
@Override
protected void operateServerState(String menuItem, final ServerState resultState) {
ServerState actualState = this.getLabel().getState();
MultipleWaitConditionHandler waitConditions = new MultipleWaitConditionHandler(waitConditionMatrix, " one of given wait condition is fulfilled");
TimePeriod timeout = TimePeriod.VERY_LONG;
if (menuItem == "Restart") {
timeout = TimePeriod.getCustom(480);
}
log.debug("Operate server's state from: + '" + actualState + "' to '" + menuItem + "'");
select();
new ContextMenuItem(menuItem).select();
// waiting until servers's state has changed from initial state into something else,
// ie. stopped -> starting or started -> stopping
new WaitWhile(new ServerHasState(this, actualState), TimePeriod.DEFAULT);
// we might expect that after the state is changed it should not go back into initial state
// or that problem dialog appears
// later on, we might get "Multiple problems have occurred" dialog
waitForProblemDialog(waitConditions, menuItem, TimePeriod.DEFAULT);
checkInitialStateChange(actualState);
// decide if we wait for SSL acceptance dialog
if ((actualState == ServerState.STOPPING || actualState == ServerState.STOPPED) && !getCertificatedAccepted()) {
new WaitUntil(waitConditions, TimePeriod.getCustom(1020));
}
new WaitUntil(new ServerHasState(this, resultState), timeout);
waitForProblemDialog(waitConditions, menuItem, TimePeriod.DEFAULT);
new WaitWhile(new SystemJobIsRunning(new JobMatcher("Inspecting CDK environment")), TimePeriod.DEFAULT);
log.debug("Operate server's state finished, the result server's state is: '" + getLabel().getState() + "'");
}
Aggregations