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

API responses fixed for munit tests mock

parent 68cfebca
No related branches found
No related tags found
1 merge request!201Cellwall annotations
Pipeline #
...@@ -88,8 +88,9 @@ describe('AliasInfoWindow', function () { ...@@ -88,8 +88,9 @@ describe('AliasInfoWindow', function () {
targets: [] targets: []
})]); })]);
}; };
return aliasWindow.init().then(function () {
return oc.getDetailDataByIdentifiedElement(new IdentifiedElement(alias), true).then(function (data) { return oc.getDetailDataByIdentifiedElement(new IdentifiedElement(alias), true);
}).then(function (data) {
var overlayDiv = aliasWindow.createOverlayInfoDiv(oc, data); var overlayDiv = aliasWindow.createOverlayInfoDiv(oc, data);
assert.ok(functions.isDomElement(overlayDiv)); assert.ok(functions.isDomElement(overlayDiv));
assert.ok(overlayDiv.innerHTML.indexOf('xField') >= 0); assert.ok(overlayDiv.innerHTML.indexOf('xField') >= 0);
...@@ -111,13 +112,14 @@ describe('AliasInfoWindow', function () { ...@@ -111,13 +112,14 @@ describe('AliasInfoWindow', function () {
modelId: map.getId(), modelId: map.getId(),
type: "ALIAS" type: "ALIAS"
}); });
return map.getModel().getByIdentifiedElement(ie, true); return map.getModel().getByIdentifiedElement(ie, true);
}).then(function (alias) { }).then(function (alias) {
aliasWindow = new AliasInfoWindow({ aliasWindow = new AliasInfoWindow({
alias: alias, alias: alias,
map: map map: map
}); });
return aliasWindow.init()
}).then(function () {
return oc.getDetailDataByIdentifiedElement(ie, true); return oc.getDetailDataByIdentifiedElement(ie, true);
}).then(function (data) { }).then(function (data) {
var overlayDiv = aliasWindow.createOverlayInfoDiv(oc, data); var overlayDiv = aliasWindow.createOverlayInfoDiv(oc, data);
......
source diff could not be displayed: it is too large. Options to address this: view the blob.
[{"elementId":"sa32","symbol":null,"formerSymbols":[],"other":{"structuralState":null,"modifications":[]},"notes":"","references":[{"resource":"622","link":"http://www.ncbi.nlm.nih.gov/gene/622","id":1104500,"type":"ENTREZ"}],"modelId":20637,"synonyms":[],"fullName":null,"complexId":null,"type":"Protein","abbreviation":null,"compartmentId":null,"name":"BDH1","bounds":{"x":1225.7682370820667,"width":80.0,"y":66.0,"height":40.0},"formula":null,"id":436152,"linkedSubmodel":null,"hierarchyVisibilityLevel":[]}] [{"elementId":"sa32","symbol":null,"formerSymbols":[],"other":{"structures":{},"structuralState":null,"modifications":[]},"notes":"","constant":false,"references":[{"resource":"622","annotatorClassName":"","descriptionByTypeRelation":"","descriptionByType":"","link":"http://www.ncbi.nlm.nih.gov/gene/622","id":1104500,"type":"ENTREZ"}],"modelId":20637,"synonyms":[],"fullName":null,"complexId":null,"type":"Protein","abbreviation":null,"compartmentId":null,"boundaryCondition":false,"initialAmount":0.0,"name":"BDH1","bounds":{"x":1225.7682370820667,"width":80.0,"y":66.0,"height":40.0},"formula":null,"id":436152,"linkedSubmodel":null,"initialConcentration":null,"hierarchyVisibilityLevel":"0"}]
\ No newline at end of file \ No newline at end of file
[{"symbol":null,"formerSymbols":[],"notes":"","references":[{"resource":"REACT_2390.1","link":"http://www.reactome.org/PathwayBrowser/#REACT_2390.1","id":860340,"type":"REACTOME"}],"modelId":15781,"synonyms":[],"fullName":null,"complexId":null,"type":"Simple molecule","abbreviation":null,"compartmentId":null,"name":"NADH","bounds":{"x":1214.2682370820667,"width":70.0,"y":128.5000000000009,"height":25.0},"formula":null,"id":329163,"linkedSubmodel":null,"hierarchyVisibilityLevel":[]}] [{"elementId":"sa34","symbol":null,"formerSymbols":[],"other":{"structures":{},"structuralState":null,"modifications":[]},"notes":"","constant":false,"references":[{"resource":"REACT_2390.1","annotatorClassName":"","descriptionByTypeRelation":"","descriptionByType":"","link":"http://reactome.org/content/detail/REACT_2390.1","id":860340,"type":"REACTOME"}],"modelId":15781,"synonyms":[],"fullName":null,"complexId":null,"type":"Simple molecule","abbreviation":null,"compartmentId":null,"boundaryCondition":false,"initialAmount":0.0,"name":"NADH","bounds":{"x":1214.2682370820667,"width":70.0,"y":128.5000000000009,"height":25.0},"formula":null,"id":329163,"linkedSubmodel":null,"initialConcentration":null,"hierarchyVisibilityLevel":"0"}]
\ No newline at end of file \ No newline at end of file
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