From e0ca6cd35a0e94507dc731fe81f3352ab22caf97 Mon Sep 17 00:00:00 2001 From: Robert Konigsberg Date: Wed, 21 Dec 2011 14:41:55 -0500 Subject: [PATCH] Add tests that would have caught the issue with filled/stacked graphs. --- auto_tests/tests/sanity.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/auto_tests/tests/sanity.js b/auto_tests/tests/sanity.js index 44e860c..243f523 100644 --- a/auto_tests/tests/sanity.js +++ b/auto_tests/tests/sanity.js @@ -100,3 +100,21 @@ SanityTestCase.prototype.testToDomYCoord = function() { assertEqualsDelta(50 - x, g.toDomYCoord(x), 0.00001); } }; + +// Here is the first of a series of tests that just ensure the graph is drawn +// without exception. +//TODO(konigsberg): Move to its own test case. +SanityTestCase.prototype.testFillStack1 = function() { + var graph = document.getElementById("graph"); + new Dygraph(graph, ZERO_TO_FIFTY, { stackedGraph: true }); +} + +SanityTestCase.prototype.testFillStack2 = function() { + var graph = document.getElementById("graph"); + new Dygraph(graph, ZERO_TO_FIFTY, { stackedGraph: true, fillGraph: true }); +} + +SanityTestCase.prototype.testFillStack3 = function() { + var graph = document.getElementById("graph"); + new Dygraph(graph, ZERO_TO_FIFTY, { fillGraph: true }); +} -- 2.7.4