Skip to content
Snippets Groups Projects
Commit 57850a1d authored by Piotr Gawron's avatar Piotr Gawron
Browse files

Merge branch '151-clicking-on-element-when-hierarchical-view-is-active' into 'master'

Resolve "clicking on element when hierarchical view is active"

Closes #151

See merge request !78
parents ce39fa2f 45385f7c
No related branches found
No related tags found
1 merge request!78Resolve "clicking on element when hierarchical view is active"
......@@ -48,7 +48,7 @@ public class HeterodimerAssociationReaction extends Reaction implements TwoReact
@Override
public String getStringType() {
return "Heterodimer associaation";
return "Heterodimer association";
}
@Override
......
......@@ -115,7 +115,7 @@ public class ElementsRestImpl extends BaseRestImpl {
} else if (column.equals("formersymbols")) {
value = element.getFormerSymbols();
} else if (column.equals("hierarchyvisibilitylevel")) {
value = element.getFormerSymbols();
value = element.getVisibilityLevel();
} else if (column.equals("linkedsubmodel")) {
if (element.getSubmodel() != null) {
value = element.getSubmodel().getSubmodel().getId();
......
......@@ -3,6 +3,7 @@ package lcsb.mapviewer.api.projects.models.bioEntities.elements;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyString;
......@@ -88,6 +89,21 @@ public class ElementRestImplTest extends RestTestFunctions {
}
}
@Test
public void testGetElementsVisibility() throws Exception {
try {
ElementsRestImpl elementRest = createMockElementRest("testFiles/model/sample.xml");
List<Map<String, Object>> result = elementRest.getElements("sample", "", "", "*", token.getId(), "");
for (Map<String, Object> map : result) {
assertTrue(map.get("hierarchyVisibilityLevel") instanceof String);
}
} catch (Exception e) {
e.printStackTrace();
throw e;
}
}
@SuppressWarnings("unchecked")
@Test
public void testGetModificationsForProtein() throws Exception {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment