Commit 921eaad0 authored by Mathieu Giraud's avatar Mathieu Giraud

tests: update

parent 43f0e167
Pipeline #36400 failed with stages
in 3 minutes and 13 seconds
......@@ -162,7 +162,7 @@ QUnit.test("axis", function(assert) {
function(clone) {
return undefined;
}, "V", true, 0, 0);
assert.equal(axis.labels.length, 2, "Just two labels: 0, undefined");
assert.equal(axis.labels.length, 3, "Just three labels: 0, 1, undefined");
// undefined values
axis = new NumericalAxis(m);
......@@ -170,6 +170,11 @@ QUnit.test("axis", function(assert) {
function(clone) {
return 'undefined';
});
assert.equal(axis.labels[0].pos, 1, "Just two labels: undefined, 0");
assert.equal(axis.labels[1].pos, 0, "Just two labels: undefined, 0");
assert.equal(axis.labels[0].pos, 1, "Just three labels: undefined, 0, 1");
assert.equal(axis.labels[1].pos, 0, "Just three labels: undefined, 0, 1");
assert.equal(axis.labels[2].pos, 0.5, "Just three labels: undefined, 0, 1");
assert.equal(axis.labels[2].text, "1", "Just three labels: undefined, 0, 1");
});
......@@ -73,7 +73,7 @@ QUnit.test("test nice_min_max_steps", function(assert) {
assert.deepEqual(nice_min_max_steps(43, 103, 5), {min: 40, max: 120, step: 20, nb_steps: 4}, "43..103 (5)");
assert.deepEqual(nice_min_max_steps(43, 103, 3), {min: 0, max: 150, step: 50, nb_steps: 3}, "43..103 (3)");
assert.deepEqual(nice_min_max_steps(42, 42, 20), {min: 42, max: 42, step: 0, nb_steps: 0}, "42..42 (20)");
assert.deepEqual(nice_min_max_steps(42, 42, 20), {min: 40, max: 50, step: 10, nb_steps: 1}, "42..42 (20)");
});
QUnit.test("prepend_path_if_not_web", function(assert) {
......
......@@ -25,7 +25,10 @@ class TestSimple < BrowserTest
def test_01_legend_scatterplot
assert ($b.scatterplot_x_legend(0).text == "TRGV5"), "First legend should be TRGV5"
assert ($b.scatterplot_y_legend(0).text == "TRGJ1"), "First legend should be TRGJ1"
assert ($b.scatterplot_x_legend(0, 2).text == "119"), "First legend should be 119, it is " + $b.scatterplot_x_legend(0, 2).text
assert ($b.scatterplot_x_legend(0, 2).text == "?"), "Legend should be ?, it is " + $b.scatterplot_x_legend(0, 2).text
assert ($b.scatterplot_x_legend(1, 2).text == "100"), "Legend should be 100, it is " + $b.scatterplot_x_legend(1, 2).text
assert ($b.scatterplot_x_legend(2, 2).text == "150"), "Legend should be 150, it is " + $b.scatterplot_x_legend(2, 2).text
assert ($b.scatterplot_y_legend(0, 2).text == "0%"), "First legend sould be 0%"
end
......
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