@@ -17,8 +17,7 @@ describe('Plotly w/o WebGL support:', function() {
1717 } ) ;
1818
1919 function checkNoWebGLMsg ( visible ) {
20- var glDiv = gd . querySelector ( 'div.gl-container' ) ;
21- var msg = glDiv . querySelector ( 'div.no-webgl' ) ;
20+ var msg = gd . querySelector ( 'div.no-webgl' ) ;
2221 if ( visible ) {
2322 expect ( msg . innerHTML . substr ( 0 , 22 ) ) . toBe ( 'WebGL is not supported' ) ;
2423 } else {
@@ -38,4 +37,69 @@ describe('Plotly w/o WebGL support:', function() {
3837 . catch ( failTest )
3938 . then ( done ) ;
4039 } ) ;
40+
41+ it ( 'gl2d subplots' , function ( done ) {
42+ Plotly . react ( gd , require ( '@mocks/gl2d_pointcloud-basic.json' ) )
43+ . then ( function ( ) {
44+ checkNoWebGLMsg ( true ) ;
45+ return Plotly . react ( gd , require ( '@mocks/10.json' ) ) ;
46+ } )
47+ . then ( function ( ) {
48+ checkNoWebGLMsg ( false ) ;
49+ } )
50+ . catch ( failTest )
51+ . then ( done ) ;
52+ } ) ;
53+
54+ it ( 'scattergl subplots' , function ( done ) {
55+ Plotly . react ( gd , require ( '@mocks/gl2d_12.json' ) )
56+ . then ( function ( ) {
57+ checkNoWebGLMsg ( true ) ;
58+ return Plotly . react ( gd , require ( '@mocks/10.json' ) ) ;
59+ } )
60+ . then ( function ( ) {
61+ checkNoWebGLMsg ( false ) ;
62+ } )
63+ . catch ( failTest )
64+ . then ( done ) ;
65+ } ) ;
66+
67+ it ( 'scatterpolargl subplots' , function ( done ) {
68+ Plotly . react ( gd , require ( '@mocks/glpolar_scatter.json' ) )
69+ . then ( function ( ) {
70+ checkNoWebGLMsg ( true ) ;
71+ return Plotly . react ( gd , require ( '@mocks/10.json' ) ) ;
72+ } )
73+ . then ( function ( ) {
74+ checkNoWebGLMsg ( false ) ;
75+ } )
76+ . catch ( failTest )
77+ . then ( done ) ;
78+ } ) ;
79+
80+ it ( 'splom subplots' , function ( done ) {
81+ Plotly . react ( gd , require ( '@mocks/splom_0.json' ) )
82+ . then ( function ( ) {
83+ checkNoWebGLMsg ( true ) ;
84+ return Plotly . react ( gd , require ( '@mocks/10.json' ) ) ;
85+ } )
86+ . then ( function ( ) {
87+ checkNoWebGLMsg ( false ) ;
88+ } )
89+ . catch ( failTest )
90+ . then ( done ) ;
91+ } ) ;
92+
93+ it ( 'parcoords subplots' , function ( done ) {
94+ Plotly . react ( gd , require ( '@mocks/gl2d_parcoords_2.json' ) )
95+ . then ( function ( ) {
96+ checkNoWebGLMsg ( true ) ;
97+ return Plotly . react ( gd , require ( '@mocks/10.json' ) ) ;
98+ } )
99+ . then ( function ( ) {
100+ checkNoWebGLMsg ( false ) ;
101+ } )
102+ . catch ( failTest )
103+ . then ( done ) ;
104+ } ) ;
41105} ) ;
0 commit comments