@@ -260,15 +260,16 @@ describe('Plotly.Snapshot', function() {
260
260
color : [ 'red' , 'blue' , 'green' ]
261
261
}
262
262
} ] , {
263
- font : { family : 'Times New Roman' }
263
+ font : { family : 'Times New Roman' } ,
264
+ showlegend : true
264
265
} )
265
266
. then ( function ( ) {
266
267
d3 . selectAll ( 'text' ) . each ( function ( ) {
267
268
var tx = d3 . select ( this ) ;
268
269
expect ( tx . style ( 'font-family' ) ) . toEqual ( '\"Times New Roman\"' ) ;
269
270
} ) ;
270
271
271
- d3 . selectAll ( '.point' ) . each ( function ( ) {
272
+ d3 . selectAll ( '.point,.scatterpts ' ) . each ( function ( ) {
272
273
var pt = d3 . select ( this ) ;
273
274
expect ( pt . style ( 'fill' ) . substr ( 0 , 6 ) ) . toEqual ( 'url(\"#' ) ;
274
275
} ) ;
@@ -280,7 +281,7 @@ describe('Plotly.Snapshot', function() {
280
281
var i ;
281
282
282
283
var textElements = svgDOM . getElementsByTagName ( 'text' ) ;
283
- expect ( textElements . length ) . toEqual ( 11 ) ;
284
+ expect ( textElements . length ) . toEqual ( 12 ) ;
284
285
285
286
for ( i = 0 ; i < textElements . length ; i ++ ) {
286
287
expect ( textElements [ i ] . style [ 'font-family' ] ) . toEqual ( '\"Times New Roman\"' ) ;
@@ -292,6 +293,10 @@ describe('Plotly.Snapshot', function() {
292
293
for ( i = 0 ; i < pointElements . length ; i ++ ) {
293
294
expect ( pointElements [ i ] . style . fill . substr ( 0 , 6 ) ) . toEqual ( 'url(\"#' ) ;
294
295
}
296
+
297
+ var legendPointElements = svgDOM . getElementsByClassName ( 'scatterpts' ) ;
298
+ expect ( legendPointElements . length ) . toEqual ( 1 ) ;
299
+ expect ( legendPointElements [ 0 ] . style . fill . substr ( 0 , 6 ) ) . toEqual ( 'url(\"#' ) ;
295
300
} )
296
301
. catch ( fail )
297
302
. then ( done ) ;
0 commit comments