Commit 542ab792 authored by Mathieu Giraud's avatar Mathieu Giraud

tests: test shortcut.js

parent cc0e95d1
QUnit.module("Shortcut", {
});
function keyMock(d) {
d.preventDefault = function() {}
return d
};
QUnit.test("shortcuts on scatterplot", function(assert) {
var m = new Model(m)
m.parseJsonData(json_data, 100)
m.loadGermline()
m.initClones()
var sp = new ScatterPlot("visu", m)
sp.init()
var shortcut = new Shortcut()
assert.equal(sp.mode, sp.MODE_GRID)
shortcut.checkKey(keyMock({'key': '#'}))
assert.equal(sp.mode, sp.MODE_BAR)
})
......@@ -46,6 +46,7 @@
<script type="text/javascript" src='../../js/database.js' data-cover></script>
<script type="text/javascript" src='../../js/tools.js' data-cover></script>
<script type="text/javascript" src='../../js/url.js' data-cover></script>
<script type="text/javascript" src='../../js/shortcut.js' data-cover></script>
<script type="text/javascript" src='../../js/speed_test.js' data-cover></script>
<script type="text/javascript" src="./testFiles/data_test.js"></script>
......@@ -105,6 +106,7 @@
<script src="./testFiles/tools_test.js"></script>
<script src="./testFiles/germline_test.js"></script>
<script src="./testFiles/url_test.js"></script>
<script src="./testFiles/shortcut_test.js"></script>
<script src="./testFiles/speed_test.js"></script>
</body>
</html>
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