use of org.eclipse.reddeer.swt.impl.tree.DefaultTree in project jbosstools-hibernate by jbosstools.
the class KnownConfigurationsView method selectConsole.
/**
* Selects console
* @param name given console name
*/
public void selectConsole(String name) {
open();
new DefaultTreeItem(new DefaultTree(this), name).select();
}
use of org.eclipse.reddeer.swt.impl.tree.DefaultTree in project jbosstools-hibernate by jbosstools.
the class KnownConfigurationsView method getConsoleConfigurations.
public List<TreeItem> getConsoleConfigurations() {
Tree tree = null;
try {
tree = new DefaultTree(this);
} catch (RedDeerException e) {
return null;
}
new WaitUntil(new ConfigrationsAreLoaded(tree));
return tree.getItems();
}
use of org.eclipse.reddeer.swt.impl.tree.DefaultTree in project jbosstools-openshift by jbosstools.
the class CreateResourcesTest method createResource.
private void createResource(String pathToResource) {
explorer.getOpenShift3Connection(connectionReq.getConnection()).getProject(testProject).select();
new ContextMenuItem(OpenShiftLabel.ContextMenu.NEW_RESOURCE).select();
new DefaultShell(OpenShiftLabel.Shell.NEW_RESOURCE);
assertTrue("Selected project has not been selected for new resource creation.", new LabeledCombo(OpenShiftLabel.TextLabels.PROJECT).getSelection().equals(testProject));
new LabeledText(OpenShiftLabel.TextLabels.RESOURCE_LOCATION).setText(pathToResource);
new FinishButton().click();
new DefaultShell(OpenShiftLabel.Shell.CREATE_RESOURCE_SUMMARY);
assertTrue("Resource is not listed in created resources summary", new DefaultTree().getAllItems().size() == 1);
new OkButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.NEW_RESOURCE));
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
}
use of org.eclipse.reddeer.swt.impl.tree.DefaultTree in project jbosstools-openshift by jbosstools.
the class NodeJSAppDebugTest method getVariable.
/**
* getVariable from Variables view.
*
* @param variable
* name
* @return TreeItem
*/
protected TreeItem getVariable(String name) {
WorkbenchView variables = new WorkbenchView("Variables");
variables.activate();
DefaultTree variablesTree = new DefaultTree();
TreeItem var = null;
try {
new WaitUntil(new TreeContainsItem(variablesTree, new WithTextMatcher(name), false));
} catch (WaitTimeoutExpiredException e) {
// not found
return null;
}
List<TreeItem> vars = variablesTree.getItems();
for (TreeItem i : vars) {
if (i.getText().equals(name)) {
var = i;
}
}
return var;
}
use of org.eclipse.reddeer.swt.impl.tree.DefaultTree in project jbosstools-openshift by jbosstools.
the class NewApplicationWizardHandlingTest method testFilteringServerTemplates.
@Test
public void testFilteringServerTemplates() {
DefaultText searchBar = new DefaultText(1);
searchBar.setText("eap70-basic-s2i");
assertTrue("There should be precisely one tree item in a tree.", new DefaultTree().getItems().size() == 1);
String templateLabel = new DefaultTree().getItems().get(0).getText();
assertTrue("There should be item representing basic EAP template in a tree but it is not there.", templateLabel.equals(OpenShiftLabel.Others.EAP_TEMPLATE) || templateLabel.equals(OpenShiftLabel.Others.EAP_TEMPLATE_OLD));
searchBar.setText("");
assertTrue("There should be more templates if search bar does not contain any search query", new DefaultTree().getItems().size() > 2);
}
Aggregations