From: Robert Konigsberg Date: Wed, 21 Dec 2011 19:41:55 +0000 (-0500) Subject: Add tests that would have caught the issue with filled/stacked graphs. X-Git-Tag: v1.0.0~398 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=e0ca6cd35a0e94507dc731fe81f3352ab22caf97;p=dygraphs.git Add tests that would have caught the issue with filled/stacked graphs. --- 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 }); +}