X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=auto_tests%2Ftests%2Fsanity.js;h=528b7a14dc4e5ec14822e5d04e29a66ac305acf0;hb=3cfc4c9f46493dfa98464ee6fdb78e72aabd32a6;hp=44e860cc85572980ab8abf34602ed1cfb05a4151;hpb=02eb7ae72eb3d5e83c2bf546d1fc2a6a60b91008;p=dygraphs.git diff --git a/auto_tests/tests/sanity.js b/auto_tests/tests/sanity.js index 44e860c..528b7a1 100644 --- a/auto_tests/tests/sanity.js +++ b/auto_tests/tests/sanity.js @@ -100,3 +100,29 @@ SanityTestCase.prototype.testToDomYCoord = function() { assertEqualsDelta(50 - x, g.toDomYCoord(x), 0.00001); } }; + +/** + * Test that the two-argument form of the constructor (no options) works. + */ +SanityTestCase.prototype.testTwoArgumentConstructor = function() { + var graph = document.getElementById("graph"); + new Dygraph(graph, ZERO_TO_FIFTY); +}; + +// 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 }); +}