File tree Expand file tree Collapse file tree 4 files changed +20
-24
lines changed Expand file tree Collapse file tree 4 files changed +20
-24
lines changed Original file line number Diff line number Diff line change 1+ 'use strict' ;
2+
3+ module . exports = function createGraphDiv ( ) {
4+ var gd = document . createElement ( 'div' ) ;
5+ gd . id = 'graph' ;
6+ document . body . appendChild ( gd ) ;
7+ return gd ;
8+ } ;
Original file line number Diff line number Diff line change 1+ 'use strict' ;
2+
3+ module . exports = function destroyGraphDiv ( ) {
4+ var gd = document . getElementById ( 'graph' ) ;
5+ document . body . removeChild ( gd ) ;
6+ } ;
Original file line number Diff line number Diff line change @@ -2,6 +2,9 @@ var d3 = require('d3');
22
33var Plotly = require ( '@src/index' ) ;
44
5+ var createGraphDiv = require ( '../assets/create_graph_div' ) ;
6+ var destroyGraphDiv = require ( '../assets/destroy_graph_div' ) ;
7+
58/*
69 * WebGL interaction test cases fail on the CircleCI
710 * most likely due to a WebGL/driver issue
@@ -12,18 +15,6 @@ var Plotly = require('@src/index');
1215describe ( 'Test plot structure' , function ( ) {
1316 'use strict' ;
1417
15- function createGraphDiv ( ) {
16- var gd = document . createElement ( 'div' ) ;
17- gd . id = 'graph' ;
18- document . body . appendChild ( gd ) ;
19- return gd ;
20- }
21-
22- function destroyGraphDiv ( ) {
23- var gd = document . getElementById ( 'graph' ) ;
24- document . body . removeChild ( gd ) ;
25- }
26-
2718 afterEach ( destroyGraphDiv ) ;
2819
2920 describe ( 'gl3d plots' , function ( ) {
Original file line number Diff line number Diff line change @@ -3,22 +3,13 @@ var d3 = require('d3');
33var Plotly = require ( '@src/index' ) ;
44var Fx = require ( '@src/plots/cartesian/graph_interact' ) ;
55
6+ var createGraphDiv = require ( '../assets/create_graph_div' ) ;
7+ var destroyGraphDiv = require ( '../assets/destroy_graph_div' ) ;
8+
69
710describe ( 'Test plot structure' , function ( ) {
811 'use strict' ;
912
10- function createGraphDiv ( ) {
11- var gd = document . createElement ( 'div' ) ;
12- gd . id = 'graph' ;
13- document . body . appendChild ( gd ) ;
14- return gd ;
15- }
16-
17- function destroyGraphDiv ( ) {
18- var gd = document . getElementById ( 'graph' ) ;
19- document . body . removeChild ( gd ) ;
20- }
21-
2213 afterEach ( destroyGraphDiv ) ;
2314
2415 describe ( 'cartesian plots' , function ( ) {
You can’t perform that action at this time.
0 commit comments