projects
/
dygraphs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bump to version 2 🎉
[dygraphs.git]
/
auto_tests
/
tests
/
per_axis.js
diff --git
a/auto_tests/tests/per_axis.js
b/auto_tests/tests/per_axis.js
index
4ae6208
..
d7f1a49
100644
(file)
--- a/
auto_tests/tests/per_axis.js
+++ b/
auto_tests/tests/per_axis.js
@@
-3,9
+3,18
@@
*
* @author konigsberg@google.com (Robert Konigsberg)
*/
*
* @author konigsberg@google.com (Robert Konigsberg)
*/
+
+import Dygraph from '../../src/dygraph';
+import * as utils from '../../src/dygraph-utils';
+
+import Util from './Util';
+import CanvasAssertions from './CanvasAssertions';
+import Proxy from './Proxy';
+
describe("per-axis", function() {
describe("per-axis", function() {
-var _origGetContext = Dygraph.getContext;
+cleanupAfterEach();
+useProxyCanvas(utils, Proxy);
var xAxisLineColor = "#00ffff";
var yAxisLineColor = "#ffff00";
var xAxisLineColor = "#00ffff";
var yAxisLineColor = "#ffff00";
@@
-13,11
+22,6
@@
var yAxisLineColor = "#ffff00";
var g, graph;
beforeEach(function() {
var g, graph;
beforeEach(function() {
- document.body.innerHTML = "<div id='graph'></div>";
- Dygraph.getContext = function(canvas) {
- return new Proxy(_origGetContext(canvas));
- }
-
var opts = {
axes : {
x : {
var opts = {
axes : {
x : {
@@
-42,10
+46,6
@@
beforeEach(function() {
g = new Dygraph(graph, data, opts);
});
g = new Dygraph(graph, data, opts);
});
-afterEach(function() {
- Dygraph.getContext = _origGetContext;
-});
-
it('testDrawXAxis', function() {
g.updateOptions({ axes : { x : { drawAxis: true }} });
assert.isTrue(graph.getElementsByClassName('dygraph-axis-label-x').length > 0);
it('testDrawXAxis', function() {
g.updateOptions({ axes : { x : { drawAxis: true }} });
assert.isTrue(graph.getElementsByClassName('dygraph-axis-label-x').length > 0);