@@ -3167,7 +3167,7 @@ describe('Test plot api', function() {
31673167 . then ( done ) ;
31683168 } ) ;
31693169
3170- var mockList = [
3170+ var svgMockList = [
31713171 [ '1' , require ( '@mocks/1.json' ) ] ,
31723172 [ '4' , require ( '@mocks/4.json' ) ] ,
31733173 [ '5' , require ( '@mocks/5.json' ) ] ,
@@ -3186,14 +3186,6 @@ describe('Test plot api', function() {
31863186 [ 'cheater_smooth' , require ( '@mocks/cheater_smooth.json' ) ] ,
31873187 [ 'finance_style' , require ( '@mocks/finance_style.json' ) ] ,
31883188 [ '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' ) ] ,
31973189 [ 'layout_image' , require ( '@mocks/layout_image.json' ) ] ,
31983190 [ 'layout-colorway' , require ( '@mocks/layout-colorway.json' ) ] ,
31993191 [ 'polar_categories' , require ( '@mocks/polar_categories.json' ) ] ,
@@ -3219,15 +3211,23 @@ describe('Test plot api', function() {
32193211 } ]
32203212 ] ;
32213213
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+
32223225 // make sure we've included every trace type in this suite
32233226 var typesTested = { } ;
32243227 var itemType ;
32253228 for ( itemType in Registry . modules ) { typesTested [ itemType ] = 0 ; }
32263229 for ( itemType in Registry . transformsRegistry ) { typesTested [ itemType ] = 0 ; }
32273230
3228- // Only include scattermapbox locally, see below
3229- delete typesTested . scattermapbox ;
3230-
32313231 // Not really being supported... This isn't part of the main bundle, and it's pretty broken,
32323232 // but it gets registered and used by a couple of the gl2d tests.
32333233 delete typesTested . contourgl ;
@@ -3320,23 +3320,30 @@ describe('Test plot api', function() {
33203320 . then ( done ) ;
33213321 }
33223322
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 ) {
33253325 _runReactMock ( mockSpec , done ) ;
33263326 } ) ;
33273327 } ) ;
33283328
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+ } ) ;
33313334
3335+ it ( '@noCI can redraw scattermapbox with no changes as a noop' , function ( done ) {
33323336 Plotly . setPlotConfig ( {
33333337 mapboxAccessToken : require ( '@build/credentials.json' ) . MAPBOX_ACCESS_TOKEN
33343338 } ) ;
33353339
33363340 _runReactMock ( [ 'scattermapbox' , require ( '@mocks/mapbox_bubbles-text.json' ) ] , done ) ;
33373341 } ) ;
33383342
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 ( ) {
33403347 for ( var itemType in typesTested ) {
33413348 expect ( typesTested [ itemType ] ) . toBeGreaterThan ( 0 , itemType + ' was not tested' ) ;
33423349 }
0 commit comments