@@ -260,15 +260,16 @@ describe('Plotly.Snapshot', function() {
260260 color : [ 'red' , 'blue' , 'green' ]
261261 }
262262 } ] , {
263- font : { family : 'Times New Roman' }
263+ font : { family : 'Times New Roman' } ,
264+ showlegend : true
264265 } )
265266 . then ( function ( ) {
266267 d3 . selectAll ( 'text' ) . each ( function ( ) {
267268 var tx = d3 . select ( this ) ;
268269 expect ( tx . style ( 'font-family' ) ) . toEqual ( '\"Times New Roman\"' ) ;
269270 } ) ;
270271
271- d3 . selectAll ( '.point' ) . each ( function ( ) {
272+ d3 . selectAll ( '.point,.scatterpts ' ) . each ( function ( ) {
272273 var pt = d3 . select ( this ) ;
273274 expect ( pt . style ( 'fill' ) . substr ( 0 , 6 ) ) . toEqual ( 'url(\"#' ) ;
274275 } ) ;
@@ -280,7 +281,7 @@ describe('Plotly.Snapshot', function() {
280281 var i ;
281282
282283 var textElements = svgDOM . getElementsByTagName ( 'text' ) ;
283- expect ( textElements . length ) . toEqual ( 11 ) ;
284+ expect ( textElements . length ) . toEqual ( 12 ) ;
284285
285286 for ( i = 0 ; i < textElements . length ; i ++ ) {
286287 expect ( textElements [ i ] . style [ 'font-family' ] ) . toEqual ( '\"Times New Roman\"' ) ;
@@ -292,6 +293,10 @@ describe('Plotly.Snapshot', function() {
292293 for ( i = 0 ; i < pointElements . length ; i ++ ) {
293294 expect ( pointElements [ i ] . style . fill . substr ( 0 , 6 ) ) . toEqual ( 'url(\"#' ) ;
294295 }
296+
297+ var legendPointElements = svgDOM . getElementsByClassName ( 'scatterpts' ) ;
298+ expect ( legendPointElements . length ) . toEqual ( 1 ) ;
299+ expect ( legendPointElements [ 0 ] . style . fill . substr ( 0 , 6 ) ) . toEqual ( 'url(\"#' ) ;
295300 } )
296301 . catch ( fail )
297302 . then ( done ) ;
0 commit comments