Commit 9aeac84b authored by Mathieu Giraud's avatar Mathieu Giraud

QUnit: correct tests for graph.js

The tests suppose that we are not rescaling x axis
parent e12f5337
......@@ -84,7 +84,9 @@ function Graph(id, model) {
this.marge4 = 70; //marge gauche (non influencé par le resize)
this.marge5 = 30; //marge top (non influencé par le resize)
this.max_ratio_between_deltas = 2.0; // maximum ratio between small and large time deltas for rescaling x axis
// maximum ratio between small and large time deltas for rescaling x axis
// if set to 1.0, no rescaling
this.max_ratio_between_deltas = 2.0;
this.data_axis = [];
this.mobil = {};
......
......@@ -8,6 +8,7 @@ test("graph: svg path builder", function() {
m.initClones()
var graph = new Graph("visu",m)
graph.max_ratio_between_deltas = 1.0
graph.init()
equal(graph.constructPath(0), " M 83.2,295.74364485223595 L 103,295.74364485223595 L 301,234.25635514776397 L 499,259.7758861041419 L 697,198.2885963996698 L 716.8,198.2885963996698", "path curve clone 0")
......@@ -24,6 +25,7 @@ test("graph: init", function() {
m.initClones()
var graph = new Graph("visu",m)
graph.max_ratio_between_deltas = 1.0
graph.init()
graph.initData()
......
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