use of org.eclipse.reddeer.common.exception.RedDeerException 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.common.exception.RedDeerException in project jbosstools-hibernate by jbosstools.
the class CodeGenerationConfigurationTest method checkGeneratedEntities.
private void checkGeneratedEntities(String src) {
PackageExplorerPart pe = new PackageExplorerPart();
pe.open();
try {
new WaitUntil(new EntityIsGenerated(prj, src, "org.gen", "Actor.java"));
pe.getProject(prj).getProjectItem(src, "org.gen", "Actor.java").open();
} catch (RedDeerException e) {
fail("Entities not generated, possible cause https://issues.jboss.org/browse/JBIDE-19217");
}
new DefaultEditor("Actor.java");
}
use of org.eclipse.reddeer.common.exception.RedDeerException in project jbosstools-hibernate by jbosstools.
the class JPADetailsViewTest method testJPADetailView.
@Test
public void testJPADetailView() {
ProjectUtils.getItem(PRJ, "org.gen", "Actor.java").open();
TextEditor textEditor = new TextEditor("Actor.java");
textEditor.setCursorPosition(20, 1);
JPADetailsView jpaDetailsView = new JPADetailsView();
jpaDetailsView.open();
try {
new DefaultStyledText("Type 'Actor' is mapped as entity.");
} catch (RedDeerException e) {
fail("JPA details should be available - known issue - https://issues.jboss.org/browse/JBIDE-17940");
}
}
use of org.eclipse.reddeer.common.exception.RedDeerException in project jbosstools-hibernate by jbosstools.
the class MappingDiagramTest method checkMappingDiagram.
private void checkMappingDiagram() {
AutoBuilding ab = new AutoBuilding() {
@Override
public Class<? extends Annotation> annotationType() {
// TODO Auto-generated method stub
return null;
}
@Override
public boolean value() {
return false;
}
@Override
public boolean cleanup() {
// TODO Auto-generated method stub
return true;
}
};
AutoBuildingRequirement abr = new AutoBuildingRequirement();
abr.setDeclaration(ab);
openMappingDiagram();
try {
new DefaultEditor(prj + ": Actor and 15 others");
} catch (RedDeerException e) {
// workaroud due to buggy auto building
abr.fulfill();
PackageExplorerPart pe = new PackageExplorerPart();
pe.getProject(prj).select();
new ShellMenuItem("Project", "Build Project").select();
new WaitWhile(new JobIsRunning());
openMappingDiagram();
new DefaultEditor(prj + ": Actor and 15 others");
} finally {
abr.cleanUp();
}
}
use of org.eclipse.reddeer.common.exception.RedDeerException in project jbosstools-openshift by jbosstools.
the class ServerAdapterFromResourceTest method newAdapterFromResource.
private void newAdapterFromResource(Resource type, String name) {
project.refresh();
project.getOpenShiftResource(type, name).select();
new ContextMenuItem(OpenShiftLabel.ContextMenu.NEW_ADAPTER_FROM_EXPLORER).select();
new DefaultShell(OpenShiftLabel.Shell.SERVER_ADAPTER_SETTINGS);
String resourceType = null;
String selectors = name + " name=" + name;
if (type.equals(Resource.DEPLOYMENT)) {
resourceType = "ReplicationController";
selectors = name + " deploymentconfig=" + serviceReq.getService().getName() + ", name=" + serviceReq.getService().getName() + ", deployment=" + name;
} else {
resourceType = type.toString().replaceFirst(".$", "").replaceAll(" ", "");
}
assertTrue("Resource should be preselected for new OpenShift 3 server adapter", new DefaultTreeItem(project.getName(), selectors).isSelected());
try {
new DefaultStyledText(resourceType);
} catch (RedDeerException e) {
fail("Resource type does not match");
}
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, name, resourceType).test());
adapter = new ServerAdapter(Version.OPENSHIFT3, name, resourceType);
}
Aggregations