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

API responses changed for mock drug unit tests

parent 62f40b18
No related branches found
No related tags found
1 merge request!201Cellwall annotations
......@@ -60,16 +60,17 @@ describe('DrugPanel', function () {
});
it('on searchResults changed', function () {
var map = helper.createCustomMap();
map.getModel().setId(15781);
var drugDbOverlay = helper.createDrugDbOverlay(map);
return ServerConnector.getProject().then(function (project) {
var map = helper.createCustomMap(project);
var drugDbOverlay = helper.createDrugDbOverlay(map);
new DrugPanel({
element: testDiv,
customMap: map
});
new DrugPanel({
element: testDiv,
customMap: map
});
return drugDbOverlay.searchByQuery("aspirin").then(function () {
return drugDbOverlay.searchByQuery("aspirin");
}).then(function () {
assert.equal(logger.getWarnings().length, 0);
assert.ok(testDiv.innerHTML.indexOf("Acetylsalicylic acid") >= 0);
});
......
[{"brandNames":[],"references":[{"resource":"DB00157","link":"http://www.drugbank.ca/drugs/DB00157","id":0,"type":"DRUGBANK"}],"synonyms":["1,4-dihydronicotinamide adenine dinucleotide","DPNH","NAD reduced form","Nicotinamide adenine dinucleotide (reduced)","Nicotinamide-adenine dinucleotide, reduced","Reduced nicotinamide adenine diphosphate","Reduced nicotinamide-adenine dinucleotide"],"name":"NADH","description":"NADH is the reduced form of NAD+, and NAD+ is the oxidized form of NADH, a coenzyme composed of ribosylnicotinamide 5'-diphosphate coupled to adenosine 5'-phosphate by pyrophosphate linkage. It is found widely in nature and is involved in numerous enzymatic reactions in which it serves as an electron carrier by being alternately oxidized (NAD+) and reduced (NADH). It forms NADP with the addition of a phosphate group to the 2' position of the adenosyl nucleotide through an ester linkage. (Dorland, 27th ed)","id":"NADH","targets":[],"bloodBrainBarrier":"YES"}]
\ No newline at end of file
[{"brandNames":[],"references":[{"resource":"DB00157","annotatorClassName":"","descriptionByTypeRelation":"","descriptionByType":"","link":"http://www.drugbank.ca/drugs/DB00157","id":0,"type":"DRUGBANK"}],"synonyms":[],"name":"NADH","description":"NADH is the reduced form of NAD+, and NAD+ is the oxidized form of NADH, a coenzyme composed of ribosylnicotinamide 5'-diphosphate coupled to adenosine 5'-phosphate by pyrophosphate linkage. It is found widely in nature and is involved in numerous enzymatic reactions in which it serves as an electron carrier by being alternately oxidized (NAD+) and reduced (NADH). It forms NADP with the addition of a phosphate group to the 2' position of the adenosyl nucleotide through an ester linkage. (Dorland, 27th ed) ","id":"NADH","targets":[],"bloodBrainBarrier":"YES"}]
\ No newline at end of file
[{"brandNames":["Acenterine","Acetophen","Adiro","Aspergum","Aspro","Bayer Aspirin","Easprin","Empirin","Nu-seals","Rhodine","Rhonal","Solprin","Solprin acid","St. Joseph Aspirin for Adults","Tasprin"],"references":[{"resource":"DB00945","link":"http://www.drugbank.ca/drugs/DB00945","id":0,"type":"DRUGBANK"},{"resource":"CHEMBL25","link":"https://www.ebi.ac.uk/chembl/compound/inspect/CHEMBL25","id":0,"type":"CHEMBL_COMPOUND"}],"synonyms":["2-Acetoxybenzenecarboxylic acid","2-Acetoxybenzoic acid","Acetylsalicylate","Acetylsalicylsäure","acide 2-(acÊtyloxy)benzoïque","acide acÊtylsalicylique","åcido acetilsalicílico","Acidum acetylsalicylicum","ASA","Aspirin","Azetylsalizylsäure","o-acetoxybenzoic acid","O-acetylsalicylic acid","o-carboxyphenyl acetate","Polopiryna","salicylic acid acetate","8-hour bayer","ACETYLSALICYLIC ACID","ASPIRIN","Acetosalic Acid","Acetylsalicylic Acid","Bayer extra strength aspirin for migraine pain","Ecotrin","Equi-Prin","Measurin","Salicylic Acid Acetate"],"name":"ASPIRIN","description":"The prototypical analgesic used in the treatment of mild to moderate pain. It has anti-inflammatory and antipyretic properties and acts as an inhibitor of cyclooxygenase which results in the inhibition of the biosynthesis of prostaglandins. Acetylsalicylic acid also inhibits platelet aggregation and is used in the prevention of arterial and venous thrombosis. (From Martindale, The Extra Pharmacopoeia, 30th ed, p5) ","id":"ASPIRIN","targets":[],"bloodBrainBarrier":"YES"}]
\ No newline at end of file
[{"brandNames":["Acenterine","Acetophen","Adiro","Aspergum","Aspro","Bayer Aspirin","Easprin","Empirin","Nu-seals","Rhodine","Rhonal","Solprin","Solprin acid","St. Joseph Aspirin for Adults","Tasprin"],"references":[{"resource":"DB00945","annotatorClassName":"","descriptionByTypeRelation":"","descriptionByType":"","link":"http://www.drugbank.ca/drugs/DB00945","id":0,"type":"DRUGBANK"},{"resource":"CHEMBL25","annotatorClassName":"","descriptionByTypeRelation":"","descriptionByType":"","link":"https://www.ebi.ac.uk/chembl/compound/inspect/CHEMBL25","id":0,"type":"CHEMBL_COMPOUND"}],"synonyms":["2-Acetoxybenzenecarboxylic acid","2-Acetoxybenzoic acid","Acetylsalicylate","Acetylsalicylsäure","acide 2-(acétyloxy)benzoïque","acide acétylsalicylique","ácido acetilsalicílico","Acidum acetylsalicylicum","ASA","Aspirin","Azetylsalizylsäure","o-acetoxybenzoic acid","O-acetylsalicylic acid","o-carboxyphenyl acetate","Polopiryna","salicylic acid acetate","8-hour bayer","ACETYLSALICYLIC ACID","ASPIRIN","Acetosalic Acid","Acetylsalicylic Acid","Bayer extra strength aspirin for migraine pain","Ecotrin","Equi-Prin","Measurin","Salicylic Acid Acetate"],"name":"ASPIRIN","description":"The prototypical analgesic used in the treatment of mild to moderate pain. It has anti-inflammatory and antipyretic properties and acts as an inhibitor of cyclooxygenase which results in the inhibition of the biosynthesis of prostaglandins. Acetylsalicylic acid also inhibits platelet aggregation and is used in the prevention of arterial and venous thrombosis. (From Martindale, The Extra Pharmacopoeia, 30th ed, p5) ","id":"ASPIRIN","targets":[],"bloodBrainBarrier":"YES"}]
\ 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