use of org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem in project jbosstools-openshift by jbosstools.
the class CreateServerAdapterTest method setAdapterDetailsAndCreateAdapterAndVerifyExistence.
private void setAdapterDetailsAndCreateAdapterAndVerifyExistence() {
new LabeledText("Eclipse Project: ").setText(PROJECT_NAME);
new DefaultTreeItem(projectReq.getProjectName()).getItems().get(0).select();
next();
finishNewServerAdapterWizardAndVerifyExistence();
}
use of org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem in project jbosstools-openshift by jbosstools.
the class CreateServerAdapterTest method testCreateOpenShift3ServerAdapterViaOpenShiftExplorerView.
@Test
public void testCreateOpenShift3ServerAdapterViaOpenShiftExplorerView() {
OpenShiftExplorerView explorer = new OpenShiftExplorerView();
explorer.getOpenShift3Connection(connectionReq.getConnection()).refresh();
explorer.getOpenShift3Connection(connectionReq.getConnection()).getProject(projectReq.getProjectName()).getServicesWithName("eap-app").get(0).select();
new ContextMenuItem(OpenShiftLabel.ContextMenu.NEW_ADAPTER_FROM_EXPLORER).select();
new DefaultShell(OpenShiftLabel.Shell.SERVER_ADAPTER_SETTINGS);
assertTrue("Service should be preselected for new OpenShift 3 server adapter", new DefaultTreeItem(projectReq.getProjectName(), "eap-app deploymentConfig=eap-app").isSelected());
assertTrue("Eclipse project should be preselected automatically for new server adapter", new LabeledText("Eclipse Project: ").getText().equals(PROJECT_NAME));
new FinishButton().click();
new WaitWhile(new ShellIsAvailable(""));
new WaitWhile(new JobIsRunning(), TimePeriod.LONG, false);
assertTrue("OpenShift 3 server adapter was not created.", new ServerAdapterExists(Version.OPENSHIFT3, "eap-app", "Service").test());
}
use of org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem in project jbosstools-openshift by jbosstools.
the class DebuggingEAPAppTest method setNewVariableValue.
// TODO this should be replaced once
// https://github.com/jboss-reddeer/reddeer/issues/1668 is fixed.
private void setNewVariableValue(String newValue, final String... variablePath) {
new WaitWhile(new JobIsRunning());
LaunchView debugView = new LaunchView();
debugView.open();
ensureCorrectFrameIsSelected(debugView);
VariablesView variablesView = new VariablesView();
variablesView.open();
new WaitUntil(new AbstractWaitCondition() {
@Override
public boolean test() {
try {
TreeItem variable = new DefaultTreeItem(variablePath);
variable.select();
return variable.isSelected();
} catch (Exception e) {
return false;
}
}
@Override
public String description() {
return "Variable is not selected";
}
}, TimePeriod.LONG);
try {
new ContextMenuItem("Change Value...").select();
} catch (CoreLayerException e) {
throw e;
}
new DefaultShell("Change Object Value");
new DefaultStyledText().setText(newValue);
new OkButton().click();
new WaitWhile(new JobIsRunning());
}
use of org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem in project jbosstools-openshift by jbosstools.
the class TemplatesCreator method selectServerTemplate.
private void selectServerTemplate(String templateName) {
new DefaultTabItem(OpenShiftLabel.TextLabels.SERVER_TEMPLATE).activate();
new WaitUntil(new TreeIsAvailable());
new DefaultTree().selectItems(new DefaultTreeItem(templateName));
}
use of org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem in project jbosstools-openshift by jbosstools.
the class BuilderImageApplicationWizardHandlingTest method selectBuilderImageAndAssertButtonsAvailability.
private void selectBuilderImageAndAssertButtonsAvailability() {
new DefaultTreeItem(BUILDER_IMAGE).select();
assertTrue("Next button should be enabled if EAP builder image is selected.", new NextButton().isEnabled());
assertFalse("Finish button should be disabled on first wizard page for builder images.", new FinishButton().isEnabled());
}
Aggregations