use of org.eclipse.reddeer.workbench.core.condition.JobIsRunning 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.workbench.core.condition.JobIsRunning in project jbosstools-openshift by jbosstools.
the class EditResourcesTest method testEditBuildConfigAndCheckChangesInExplorer.
@Test
public void testEditBuildConfigAndCheckChangesInExplorer() {
TextEditor editor = getBuildConfigTextEditor();
String text = editor.getText();
if (buildConfig == null) {
buildConfig = text;
}
editor.setText(text.replace(originalRepo, customRepo));
editor.close(true);
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
assertTrue("Changes from updating of a build config should be shown " + "in Properties view, but it is not.", getBuildConfig().getPropertyValue("Source", "URI").equals(customRepo));
}
use of org.eclipse.reddeer.workbench.core.condition.JobIsRunning in project jbosstools-openshift by jbosstools.
the class InteligentDeleteResourceTest method deleteResource.
private void deleteResource(ResourceOpenShift resource) {
OpenShiftExplorerView explorer = new OpenShiftExplorerView();
OpenShiftProject openshiftProject = explorer.getOpenShift3Connection(connectionReq.getConnection()).getProject(projectReq.getProjectName());
openshiftProject.refresh();
DeleteResourcesWizard deleteResourcesWizard = new DeleteResourcesWizard(connectionReq.getConnection());
deleteResourcesWizard.openWizardFromExplorer(projectReq.getProjectName());
List<TableItem> items = deleteResourcesWizard.getResourcesByType(resource);
for (TableItem item : items) {
item.select();
}
deleteResourcesWizard.delete();
new WaitUntil(new JobIsRunning(), false);
}
use of org.eclipse.reddeer.workbench.core.condition.JobIsRunning in project jbosstools-openshift by jbosstools.
the class AbstractOpenShiftApplicationWizard method signToOpenShiftAndClickNext.
private void signToOpenShiftAndClickNext() {
new DefaultShell(OpenShiftLabel.Shell.NEW_APP_WIZARD);
selectConnection(username, server, new DefaultCombo(0));
new NextButton().click();
processUntrustedSSLCertificate();
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
new WaitUntil(new ControlIsEnabled(new BackButton()), TimePeriod.LONG);
}
use of org.eclipse.reddeer.workbench.core.condition.JobIsRunning in project jbosstools-openshift by jbosstools.
the class OpenShift3ConnectionWizard method finishAndHandleCertificate.
public void finishAndHandleCertificate() {
new WaitUntil(new ControlIsEnabled(new FinishButton()), TimePeriod.LONG);
new FinishButton().click();
try {
new DefaultShell(OpenShiftLabel.Shell.UNTRUSTED_SSL_CERTIFICATE);
new PushButton("Yes").click();
} catch (RedDeerException ex) {
fail("Aceptance of SSL certificate failed.");
}
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.NEW_CONNECTION), TimePeriod.LONG);
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
}
Aggregations