Commit efd7c546 authored by flothoni's avatar flothoni

segmenter_test; add some test on first_clone setting

link to #2041
parent 9beb7d45
Pipeline #71525 passed with stages
in 5 minutes and 40 seconds
......@@ -12,6 +12,7 @@ QUnit.test("segmenter", function(assert) {
var segment = new Segment("segment", m);
segment.init()
assert.equal(segment.first_clone, 0, "segment.first_clone is set to 0 at init")
//select test
m.select(0)
......@@ -21,6 +22,7 @@ QUnit.test("segmenter", function(assert) {
m.select(1)
var div1 = document.getElementById("f1");
assert.notEqual(div1.innerHTML.indexOf("test2"), -1, "select : Ok")
assert.equal(segment.first_clone, 0, "segment.first_clone still set to 0 if clones 0 and 1 are selected")
m.select(2)
var div2 = document.getElementById("f2");
......@@ -30,6 +32,7 @@ QUnit.test("segmenter", function(assert) {
assert.equal(document.getElementById("f0"), null, "unselect : Ok")
assert.equal(document.getElementById("f1"), null, "unselect : Ok")
assert.equal(document.getElementById("f2"), null, "unselect : Ok")
assert.equal(segment.first_clone, 0, "segment.first_clone is set to 0 when no clones are selected")
m.select(0);
m.select(2);
......@@ -82,6 +85,11 @@ QUnit.test("segmenter", function(assert) {
m.select(2)
m.changeTime(3)
assert.equal(document.getElementsByClassName("stats_content")[0].innerHTML, "1 clone, 3 reads ", "stats (1 clone with few reads) : Ok")
m.unselectAll()
m.select(2)
m.select(0)
assert.equal(segment.first_clone, 2, "segment.first_clone is set to 2, even if bigger clone is selected")
});
QUnit.test("sequence", function(assert) {
......
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