Add textarea (oops)
[dygraphs.git] / auto_tests / tests / sanity.js
index 1a56c2d..528b7a1 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (c)  2011 Google, Inc.
+// Copyright (c) 2011 Google, Inc.
 //
 // Permission is hereby granted, free of charge, to any person obtaining a copy
 // of this software and associated documentation files (the "Software"), to deal
@@ -97,6 +97,32 @@ SanityTestCase.prototype.testToDomYCoord = function() {
   assertEquals(0, g.toDomYCoord(50));
   
   for (var x = 0; x <= 50; x++) {
-    MoreAsserts.assertEqualsDelta(50 - x, g.toDomYCoord(x), 0.00001);
+    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 });
+}