Commit 9ea7264d authored by marc's avatar marc Committed by marc duez

QUnit: update test for d3v5

-d3v5 lineGenerator() function produce new "path" for graph view
parent 6e9e9391
......@@ -12,8 +12,8 @@ QUnit.test("svg path builder", function(assert) {
graph.max_ratio_between_deltas = 1.0
graph.init()
assert.equal(graph.constructPath(0), " M 70.02,40.565412010323904 L 70.05,40.565412010323904 L 70.35,40.434587989676096 L 70.65,40.488884864051364 L 70.95,40.35806084340355 L 70.98,40.35806084340355")
assert.equal(graph.constructPathR(5), " M 70,41.1 L 70,40.69623603097172 L 70.05,40.69623603097172 L 70.35,40.565412010323904 L 70.65,40.69623603097172 L 70.95,40.565412010323904 L 71,40.565412010323904 L 71,41.1 Z ", "resolution curve 5 reads")
assert.equal(graph.constructPath(0), "M70.02,40.565412010323904C70.03,40.565412010323904,70.03999999999999,40.565412010323904,70.05,40.565412010323904C70.14999999999999,40.565412010323904,70.25,40.434587989676096,70.35,40.434587989676096C70.45,40.434587989676096,70.55,40.488884864051364,70.65,40.488884864051364C70.75,40.488884864051364,70.85000000000001,40.35806084340355,70.95,40.35806084340355C70.96000000000001,40.35806084340355,70.97,40.35806084340355,70.98,40.35806084340355")
assert.equal(graph.constructPathR(5), "M70,41.1C70,41.1,70,40.69623603097172,70,40.69623603097172C70.01666666666667,40.69623603097172,70.03333333333333,40.69623603097172,70.05,40.69623603097172C70.14999999999999,40.69623603097172,70.25,40.565412010323904,70.35,40.565412010323904C70.45,40.565412010323904,70.55,40.69623603097172,70.65,40.69623603097172C70.75,40.69623603097172,70.85000000000001,40.565412010323904,70.95,40.565412010323904C70.96666666666667,40.565412010323904,70.98333333333333,40.565412010323904,71,40.565412010323904C71,40.565412010323904,71,41.1,71,41.1")
var stack = new Stack(m)
stack.compute();
assert.equal(graph.constructStack(1, stack), " M 70.05,40.95 L 70.35,40.9 L 70.65,40.925 L 70.95,40.85 L 70.95,40.75 L 70.65,40.875 L 70.35,40.7 L 70.05,40.85 Z", "path stack clone 1")
......@@ -40,7 +40,7 @@ QUnit.test("init", function(assert) {
assert.deepEqual(graph.data_clone[0], {
"id": 0,
"name": "line0",
"path": " M 70.02,40.565412010323904 L 70.05,40.565412010323904 L 70.35,40.434587989676096 L 70.65,40.488884864051364 L 70.95,40.35806084340355 L 70.98,40.35806084340355"
"path": "M70.02,40.565412010323904C70.03,40.565412010323904,70.03999999999999,40.565412010323904,70.05,40.565412010323904C70.14999999999999,40.565412010323904,70.25,40.434587989676096,70.35,40.434587989676096C70.45,40.434587989676096,70.55,40.488884864051364,70.65,40.488884864051364C70.75,40.488884864051364,70.85000000000001,40.35806084340355,70.95,40.35806084340355C70.96000000000001,40.35806084340355,70.97,40.35806084340355,70.98,40.35806084340355"
},
"initClones")
......@@ -48,7 +48,7 @@ QUnit.test("init", function(assert) {
assert.deepEqual(graph.data_res[0], {
"id": 7,
"name": "resolution1",
"path": " M 70,41.1 L 70,41 L 70.05,41 L 70.35,40.869175979352185 L 70.65,41 L 70.95,40.869175979352185 L 71,40.869175979352185 L 71,41.1 Z "
"path": "M70,41.1C70,41.1,70,41,70,41C70.01666666666667,41,70.03333333333333,41,70.05,41C70.14999999999999,41,70.25,40.869175979352185,70.35,40.869175979352185C70.45,40.869175979352185,70.55,41,70.65,41C70.75,41,70.85000000000001,40.869175979352185,70.95,40.869175979352185C70.96666666666667,40.869175979352185,70.98333333333333,40.869175979352185,71,40.869175979352185C71,40.869175979352185,71,41.1,71,41.1"
},
"initRes")
......
......@@ -170,7 +170,7 @@ QUnit.test("multiple selection", function(assert) {
test2();
done();
});
}, 1000);
function test1() {
sp.activeSelectorAt([sp_width*0.5, sp_height*0.5]);
......
......@@ -14,7 +14,7 @@
}
</style>
<script type="text/javascript" src='../../js/lib/d3.v3.js'></script>
<script type="text/javascript" src='../../js/lib/d3.v5.min.js'></script>
<script type="text/javascript" src="../../js/lib/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="../../js/lib/jquery.form.js"></script>
<script type="text/javascript" src='../../js/lib/file.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