Commit 69a09a87 authored by Marc Duez's avatar Marc Duez

Qunit : segmenter test

parent e3b23a91
test("Segmenter : ", function() {
var m = new Model();
m.parseJsonData(json_data,100)
m.loadGermline()
m.initClones()
var segment = new Segment("segment", m);
segment.init()
//select test
m.select(0)
var div0 = document.getElementById("f0");
notEqual(div0.innerHTML.indexOf("test1"), -1, "select : Ok")
m.select(1)
var div1 = document.getElementById("f1");
notEqual(div1.innerHTML.indexOf("test2"), -1, "select : Ok")
m.select(2)
var div2 = document.getElementById("f2");
notEqual(div2.innerHTML.indexOf("test3"), -1, "select : Ok")
m.unselectAll()
equal(document.getElementById("f0"), null, "unselect : Ok")
equal(document.getElementById("f1"), null, "unselect : Ok")
equal(document.getElementById("f2"), null, "unselect : Ok")
//
deepEqual(segment.findPotentialField(), ["","m","cdr3","fr1"], "potentialField : Ok")
m.select(0)
deepEqual(segment.toFasta(), "> test1 // 5.000%\naaaaaaaaaaaaaaaaaaaAG\n","toFasta :Ok")
m.focusIn(0)
m.updateElem([0])
equal($("#f0").css("background-color"), "rgb(204, 204, 204)", "focus : Ok")
m.focusOut()
m.updateElem([0])
notEqual($("#f0").css("background-color"), "rgb(204, 204, 204)", "focusOut : Ok")
});
\ No newline at end of file
......@@ -9,6 +9,9 @@
.flash_container, .log_container, .popup_container, .data-container, .info-container, .dataMenu, .tagSelector{
display:none !important;
}
.list_focus{
background : rgb(204, 204, 204);
}
</style>
<script type="text/javascript" src='../../js/lib/d3.v3.js'></script>
......@@ -55,6 +58,7 @@
<div style="opacity:0% !important; position:absolute; z-index:-5">
<div id="data-container" ></div>
<div id="visu" style="width:800px; height:500px;"></div>
<div id="segment" style="width:800px; height:500px;"></div>
<div id="info-row" style="width:800px; height:500px;"><div id="info"> </div></div>
<div id="list-row" style="width:800px; height:500px;"><div id="list"> </div></div>
<div id="data-row" style="width:800px; height:500px;"><div id="data"> </div></div>
......@@ -93,5 +97,6 @@
<script src="./testFiles/graph_test.js"></script>
<script src="./testFiles/com_test.js"></script>
<script src="./testFiles/list_test.js"></script>
<script src="./testFiles/segmenter_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