Commit dccd028f authored by Mathieu Giraud's avatar Mathieu Giraud

tests: testing 'Info' view

See #2517.
parent 78852ee7
QUnit.module("Info", {
});
QUnit.test("container, boxes", function(assert) {
var m = new Model()
m.parseJsonData(json_data, 10)
m.loadGermline()
m.initClones()
var builder = new Builder(m)
var info = new Info("info", m, builder)
assert.equal(info.id, "info", "info.id")
info.init()
var cont = info.create_info_container("bla bla", "cl", "Id", "Placeholder", "target")
assert.includes(cont.outerHTML, '>bla bla</textarea>', 'create_info_container: content')
assert.includes(cont.outerHTML, 'placeholder=\"Placeholder\"', 'create_info_container: placeholder')
var i = document.getElementById('info')
assert.includes(i.outerHTML, '<span>2014-10-20</span>', 'info contains date')
var sbnm = document.getElementsByClassName('systemBoxNameMenu')
assert.equal(sbnm.length, 2, 'two locus boxes')
})
......@@ -31,6 +31,7 @@
<script type="text/javascript" src='../../js/model_loader.js' data-cover></script>
<script type="text/javascript" src='../../js/model.js' data-cover></script>
<script type="text/javascript" src='../../js/clone.js' data-cover></script>
<script type="text/javascript" src='../../js/info.js' data-cover></script>
<script type="text/javascript" src='../../js/list.js' data-cover></script>
<script type="text/javascript" src="../../js/generic_axis.js" data-cover> </script>
<script type="text/javascript" src="../../js/germline_axis.js" data-cover> </script>
......@@ -101,6 +102,7 @@
<script src="./testFiles/axis_test.js"></script>
<script src="./testFiles/graph_test.js"></script>
<script src="./testFiles/com_test.js"></script>
<script src="./testFiles/info_test.js"></script>
<script src="./testFiles/list_test.js"></script>
<script src="./testFiles/segmenter_test.js"></script>
<script src="./testFiles/tools_test.js"></script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment