use of org.eclipse.reddeer.swt.condition.ShellIsAvailable 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.condition.ShellIsAvailable in project jbosstools-openshift by jbosstools.
the class CreateApplicationOnBuilderImageTest method testCreateApplicationBasedOnBuilderImage.
@Test
public void testCreateApplicationBasedOnBuilderImage() {
OpenShiftExplorerView explorer = new OpenShiftExplorerView();
new NewOpenShift3ApplicationWizard(connectionReq.getConnection()).openWizardFromExplorer();
BuilderImageApplicationWizardHandlingTest.nextToBuildConfigurationWizardPage();
applicationName = new LabeledText("Name: ").getText();
new WaitUntil(new ControlIsEnabled(new FinishButton()));
new FinishButton().click();
new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.APPLICATION_SUMMARY), TimePeriod.LONG);
new DefaultShell(OpenShiftLabel.Shell.APPLICATION_SUMMARY);
new OkButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.APPLICATION_SUMMARY));
CreateApplicationFromTemplateTest.importApplicationAndVerify(projectName);
OpenShiftProject project = explorer.getOpenShift3Connection(connectionReq.getConnection()).getProject();
project.refresh();
new WaitWhile(new JobIsRunning(), TimePeriod.getCustom(120));
new WaitUntil(new OpenShiftResourceExists(Resource.BUILD_CONFIG, connectionReq.getConnection()), TimePeriod.LONG, false);
List<OpenShiftResource> buildConfig = project.getOpenShiftResources(Resource.BUILD_CONFIG);
assertTrue("There should be precisely 1 build config for created application, but there is following amount" + " of build configs: " + buildConfig.size(), buildConfig.size() == 1);
List<OpenShiftResource> imageStream = project.getOpenShiftResources(Resource.IMAGE_STREAM);
assertTrue("There should be precisely 1 image stream for created application, but there is following amount" + " of image streams: " + imageStream.size(), imageStream.size() == 1);
List<OpenShiftResource> routes = project.getOpenShiftResources(Resource.ROUTE);
assertTrue("There should be precisely 1 route for created application, but there is following amount" + " of routes:" + routes.size(), routes.size() == 1);
assertTrue("Generated (default) route should contain application name, but it's not contained.", routes.get(0).getName().equals(applicationName));
List<OpenShiftResource> services = project.getOpenShiftResources(Resource.SERVICE);
assertTrue("There should be precisely 1 service for created application, but there is following amount" + " of services: " + services.size(), services.size() == 1);
}
use of org.eclipse.reddeer.swt.condition.ShellIsAvailable in project jbosstools-openshift by jbosstools.
the class AbstractOpenShiftWizardPageTest method setUp.
@Before
public void setUp() {
this.wizard = new OpenShiftEventTestWizard();
Shell shell = new WorkbenchShell().getSWTWidget();
Display.asyncExec(new Runnable() {
@Override
public void run() {
org.eclipse.jface.wizard.WizardDialog dialog = new org.eclipse.jface.wizard.WizardDialog(shell, wizard);
dialog.create();
dialog.open();
}
});
new WaitUntil(new ShellIsAvailable(OpenShiftEventTestWizard.TITLE));
wizardBot = new WizardDialog();
}
use of org.eclipse.reddeer.swt.condition.ShellIsAvailable in project jbosstools-openshift by jbosstools.
the class MinishiftServerEditor method openLaunchConfigurationFromLink.
public void openLaunchConfigurationFromLink() {
log.info("Activate launch configuration via link");
getLaunchConfigurationHyperLink().activate();
ShellIsAvailable launch = new ShellIsAvailable("Edit Configuration");
try {
new WaitUntil(launch, TimePeriod.DEFAULT);
} catch (WaitTimeoutExpiredException exc) {
log.error("WaitTimeoutExpiredException occured while waiting for Edit Configuration dialog");
}
}
use of org.eclipse.reddeer.swt.condition.ShellIsAvailable in project jbosstools-openshift by jbosstools.
the class CDKServerEditorAbstractTest method errorDialogAppeared.
private void errorDialogAppeared() {
try {
new WaitUntil(new ShellIsAvailable(new DefaultShell(getServerAdapter())), TimePeriod.MEDIUM);
log.info("Error Message Dialog appeared as expected");
} catch (WaitTimeoutExpiredException exc) {
log.error(exc.getMessage());
fail("Error Message Dialog did not appear while trying to save editor");
}
new OkButton().click();
}
Aggregations