@@ -3167,7 +3167,7 @@ describe('Test plot api', function() {
3167
3167
. then ( done ) ;
3168
3168
} ) ;
3169
3169
3170
- var mockList = [
3170
+ var svgMockList = [
3171
3171
[ '1' , require ( '@mocks/1.json' ) ] ,
3172
3172
[ '4' , require ( '@mocks/4.json' ) ] ,
3173
3173
[ '5' , require ( '@mocks/5.json' ) ] ,
@@ -3186,14 +3186,6 @@ describe('Test plot api', function() {
3186
3186
[ 'cheater_smooth' , require ( '@mocks/cheater_smooth.json' ) ] ,
3187
3187
[ 'finance_style' , require ( '@mocks/finance_style.json' ) ] ,
3188
3188
[ 'geo_first' , require ( '@mocks/geo_first.json' ) ] ,
3189
- [ 'gl2d_heatmapgl' , require ( '@mocks/gl2d_heatmapgl.json' ) ] ,
3190
- [ 'gl2d_line_dash' , require ( '@mocks/gl2d_line_dash.json' ) ] ,
3191
- [ 'gl2d_parcoords_2' , require ( '@mocks/gl2d_parcoords_2.json' ) ] ,
3192
- [ 'gl2d_pointcloud-basic' , require ( '@mocks/gl2d_pointcloud-basic.json' ) ] ,
3193
- [ 'gl3d_annotations' , require ( '@mocks/gl3d_annotations.json' ) ] ,
3194
- [ 'gl3d_set-ranges' , require ( '@mocks/gl3d_set-ranges.json' ) ] ,
3195
- [ 'gl3d_world-cals' , require ( '@mocks/gl3d_world-cals.json' ) ] ,
3196
- [ 'glpolar_style' , require ( '@mocks/glpolar_style.json' ) ] ,
3197
3189
[ 'layout_image' , require ( '@mocks/layout_image.json' ) ] ,
3198
3190
[ 'layout-colorway' , require ( '@mocks/layout-colorway.json' ) ] ,
3199
3191
[ 'polar_categories' , require ( '@mocks/polar_categories.json' ) ] ,
@@ -3219,15 +3211,23 @@ describe('Test plot api', function() {
3219
3211
} ]
3220
3212
] ;
3221
3213
3214
+ var glMockList = [
3215
+ [ 'gl2d_heatmapgl' , require ( '@mocks/gl2d_heatmapgl.json' ) ] ,
3216
+ [ 'gl2d_line_dash' , require ( '@mocks/gl2d_line_dash.json' ) ] ,
3217
+ [ 'gl2d_parcoords_2' , require ( '@mocks/gl2d_parcoords_2.json' ) ] ,
3218
+ [ 'gl2d_pointcloud-basic' , require ( '@mocks/gl2d_pointcloud-basic.json' ) ] ,
3219
+ [ 'gl3d_annotations' , require ( '@mocks/gl3d_annotations.json' ) ] ,
3220
+ [ 'gl3d_set-ranges' , require ( '@mocks/gl3d_set-ranges.json' ) ] ,
3221
+ [ 'gl3d_world-cals' , require ( '@mocks/gl3d_world-cals.json' ) ] ,
3222
+ [ 'glpolar_style' , require ( '@mocks/glpolar_style.json' ) ] ,
3223
+ ] ;
3224
+
3222
3225
// make sure we've included every trace type in this suite
3223
3226
var typesTested = { } ;
3224
3227
var itemType ;
3225
3228
for ( itemType in Registry . modules ) { typesTested [ itemType ] = 0 ; }
3226
3229
for ( itemType in Registry . transformsRegistry ) { typesTested [ itemType ] = 0 ; }
3227
3230
3228
- // Only include scattermapbox locally, see below
3229
- delete typesTested . scattermapbox ;
3230
-
3231
3231
// Not really being supported... This isn't part of the main bundle, and it's pretty broken,
3232
3232
// but it gets registered and used by a couple of the gl2d tests.
3233
3233
delete typesTested . contourgl ;
@@ -3320,23 +3320,30 @@ describe('Test plot api', function() {
3320
3320
. then ( done ) ;
3321
3321
}
3322
3322
3323
- mockList . forEach ( function ( mockSpec ) {
3324
- it ( 'can redraw "' + mockSpec [ 0 ] + '" with no changes as a noop' , function ( done ) {
3323
+ svgMockList . forEach ( function ( mockSpec ) {
3324
+ it ( 'can redraw "' + mockSpec [ 0 ] + '" with no changes as a noop (svg mocks) ' , function ( done ) {
3325
3325
_runReactMock ( mockSpec , done ) ;
3326
3326
} ) ;
3327
3327
} ) ;
3328
3328
3329
- it ( '@noCI can redraw scattermapbox with no changes as a noop' , function ( done ) {
3330
- typesTested . scattermapbox = 0 ;
3329
+ glMockList . forEach ( function ( mockSpec ) {
3330
+ it ( 'can redraw "' + mockSpec [ 0 ] + '" with no changes as a noop (gl mocks)' , function ( done ) {
3331
+ _runReactMock ( mockSpec , done ) ;
3332
+ } ) ;
3333
+ } ) ;
3331
3334
3335
+ it ( '@noCI can redraw scattermapbox with no changes as a noop' , function ( done ) {
3332
3336
Plotly . setPlotConfig ( {
3333
3337
mapboxAccessToken : require ( '@build/credentials.json' ) . MAPBOX_ACCESS_TOKEN
3334
3338
} ) ;
3335
3339
3336
3340
_runReactMock ( [ 'scattermapbox' , require ( '@mocks/mapbox_bubbles-text.json' ) ] , done ) ;
3337
3341
} ) ;
3338
3342
3339
- it ( 'tested every trace & transform type at least once' , function ( ) {
3343
+ // since CI breaks up gl/svg types, and drops scattermapbox, this test won't work there
3344
+ // but I should hope that if someone is doing something as major as adding a new type,
3345
+ // they'll run the full test suite locally!
3346
+ it ( '@noCI tested every trace & transform type at least once' , function ( ) {
3340
3347
for ( var itemType in typesTested ) {
3341
3348
expect ( typesTested [ itemType ] ) . toBeGreaterThan ( 0 , itemType + ' was not tested' ) ;
3342
3349
}
0 commit comments