Mercurial > hg > webaudioevaluationtool
diff test_create/test_core.js @ 2912:7b6cdd27f3ee
Completed #222
author | Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk> |
---|---|
date | Tue, 01 Aug 2017 14:07:10 +0100 |
parents | bcb741f60298 |
children | b7347521a226 |
line wrap: on
line diff
--- a/test_create/test_core.js Tue Aug 01 11:57:16 2017 +0100 +++ b/test_create/test_core.js Tue Aug 01 14:07:10 2017 +0100 @@ -86,6 +86,11 @@ specification.processSchema(text); $s.globalSchema = specification.getSchema(); }); + $s.availableInterfaceModules = []; + get("interfaces/interfaces.json").then(JSON.parse).then(function (d) { + $s.availableInterfaceModules = d.interfaces; + $s.$apply(); + }); $s.specification = specification; $s.selectedTestPrototype = undefined; $s.setTestPrototype = function (obj) { @@ -276,8 +281,8 @@ if ($s.schema) { var spec = $s.schema.querySelector("attribute[name=\"" + name + "\"]") || $w.specification.schema.querySelector("attribute[name=\"" + name + "\"]"); var attr = spec.getAttribute("default"); - if (attr === undefined) { - return ""; + if (attr === null) { + return "Not set"; } return attr; } @@ -498,8 +503,8 @@ $s.placeholder = function (name) { var spec = $s.schema.querySelector("attribute[name=\"" + name + "\"]") || $w.specification.schema.querySelector("attribute[name=\"" + name + "\"]"); var attr = spec.getAttribute("default"); - if (attr === undefined) { - return ""; + if (attr === null) { + return "Not set"; } return attr; }