use of org.eclipse.reddeer.common.wait.WaitUntil in project jbosstools-openshift by jbosstools.
the class CreateApplicationFromTemplateTest method createApplicationFromLocalWorkspaceTemplate.
@Test
public void createApplicationFromLocalWorkspaceTemplate() {
new NewOpenShift3ApplicationWizard(connectionReq.getConnection()).openWizardFromExplorer(DatastoreOS3.PROJECT1_DISPLAYED_NAME);
new DefaultTabItem(OpenShiftLabel.TextLabels.CUSTOM_TEMPLATE).activate();
new PushButton(OpenShiftLabel.Button.BROWSE_WORKSPACE).click();
new DefaultShell(OpenShiftLabel.Shell.SELECT_OPENSHIFT_TEMPLATE);
new DefaultTreeItem(TESTS_PROJECT, "eap64-basic-s2i.json").select();
new OkButton().click();
new DefaultShell(OpenShiftLabel.Shell.NEW_APP_WIZARD);
assertTrue("Template from workspace is not correctly shown in text field containing its path", new LabeledText(OpenShiftLabel.TextLabels.SELECT_LOCAL_TEMPLATE).getText().equals("${workspace_loc:" + File.separator + TESTS_PROJECT + File.separator + "eap64-basic-s2i.json}"));
new WaitUntil(new ControlIsEnabled(new CancelButton()));
// TODO: Remove comment once JBIDE-24492 is resolved
// assertTrue("Defined resource button should be enabled",
// new PushButton(OpenShiftLabel.Button.DEFINED_RESOURCES).isEnabled());
completeApplicationCreationAndVerify(helloworldProject);
}
use of org.eclipse.reddeer.common.wait.WaitUntil 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.common.wait.WaitUntil 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.common.wait.WaitUntil in project jbosstools-openshift by jbosstools.
the class DebuggingEAPAppTest method waitForserverAdapterToBeInRightState.
private static void waitForserverAdapterToBeInRightState() {
new WaitUntil(new ServerHasState(new ServersView2().getServer(serverAdapter.getLabel()), ServerState.DEBUGGING), TimePeriod.VERY_LONG);
new WaitUntil(new ServerHasPublishState(new ServersView2().getServer(serverAdapter.getLabel()), ServerPublishState.SYNCHRONIZED));
}
use of org.eclipse.reddeer.common.wait.WaitUntil in project jbosstools-openshift by jbosstools.
the class DebuggingEAPAppTest method checkVariablesView.
private void checkVariablesView() {
VariablesView variablesView = new VariablesView();
variablesView.open();
// wait for variables to have correct value
new WaitUntil(new AbstractWaitCondition() {
@Override
public boolean test() {
return variablesView.getValue("name").equals("World");
}
});
new WaitUntil(new AbstractWaitCondition() {
@Override
public boolean test() {
return variablesView.getValue("this").contains("HelloService");
}
});
}
Aggregations