@@ -75,8 +75,8 @@ describe('Visible rangesliders', function() {
75
75
expect ( + bg . getAttribute ( 'width' ) ) . toEqual ( expectedWidth ) ;
76
76
expect ( + bg . getAttribute ( 'height' ) ) . toEqual ( 66 ) ;
77
77
78
- expect ( bg . getAttribute ( ' fill' ) ) . toBe ( '#fafafa ' ) ;
79
- expect ( bg . getAttribute ( ' stroke' ) ) . toBe ( 'black ' ) ;
78
+ expect ( bg . style . fill ) . toBe ( 'rgb(250, 250, 250) ' ) ;
79
+ expect ( bg . style . stroke ) . toBe ( 'rgb(0, 0, 0) ' ) ;
80
80
expect ( + bg . getAttribute ( 'stroke-width' ) ) . toBe ( 2 ) ;
81
81
82
82
return Plotly . relayout ( gd , {
@@ -91,8 +91,8 @@ describe('Visible rangesliders', function() {
91
91
92
92
expect ( + bg . getAttribute ( 'height' ) ) . toEqual ( 32 ) ;
93
93
94
- expect ( bg . getAttribute ( ' fill' ) ) . toBe ( '#ffff80 ' ) ;
95
- expect ( bg . getAttribute ( ' stroke' ) ) . toBe ( '#404040 ' ) ;
94
+ expect ( bg . style . fill ) . toBe ( 'rgb(255, 255, 128) ' ) ;
95
+ expect ( bg . style . stroke ) . toBe ( 'rgb(64, 64, 64) ' ) ;
96
96
expect ( + bg . getAttribute ( 'stroke-width' ) ) . toBe ( 1 ) ;
97
97
} )
98
98
. then ( done , done . fail ) ;
@@ -366,8 +366,8 @@ describe('Visible rangesliders', function() {
366
366
expect ( + maskMin . getAttribute ( 'width' ) ) . toEqual ( maskMinWidth ) ;
367
367
expect ( + maskMax . getAttribute ( 'width' ) ) . toEqual ( maskMaxWidth ) ;
368
368
369
- expect ( bg . getAttribute ( ' fill' ) ) . toBe ( 'red ' ) ;
370
- expect ( bg . getAttribute ( ' stroke' ) ) . toBe ( 'black ' ) ;
369
+ expect ( bg . style . fill ) . toBe ( 'rgb(255, 0, 0) ' ) ;
370
+ expect ( bg . style . stroke ) . toBe ( 'rgb(0, 0, 0) ' ) ;
371
371
expect ( bg . getAttribute ( 'stroke-width' ) ) . toBe ( '2' ) ;
372
372
373
373
return Plotly . relayout ( gd , 'xaxis.rangeslider.bordercolor' , 'blue' ) ;
@@ -376,8 +376,8 @@ describe('Visible rangesliders', function() {
376
376
expect ( + maskMin . getAttribute ( 'width' ) ) . toEqual ( maskMinWidth ) ;
377
377
expect ( + maskMax . getAttribute ( 'width' ) ) . toEqual ( maskMaxWidth ) ;
378
378
379
- expect ( bg . getAttribute ( ' fill' ) ) . toBe ( 'red ' ) ;
380
- expect ( bg . getAttribute ( ' stroke' ) ) . toBe ( 'blue ' ) ;
379
+ expect ( bg . style . fill ) . toBe ( 'rgb(255, 0, 0) ' ) ;
380
+ expect ( bg . style . stroke ) . toBe ( 'rgb(0, 0, 255) ' ) ;
381
381
expect ( bg . getAttribute ( 'stroke-width' ) ) . toBe ( '2' ) ;
382
382
383
383
return Plotly . relayout ( gd , 'xaxis.rangeslider.borderwidth' , 3 ) ;
@@ -386,8 +386,8 @@ describe('Visible rangesliders', function() {
386
386
expect ( + maskMin . getAttribute ( 'width' ) ) . toEqual ( maskMinWidth ) ;
387
387
expect ( + maskMax . getAttribute ( 'width' ) ) . toEqual ( maskMaxWidth ) ;
388
388
389
- expect ( bg . getAttribute ( ' fill' ) ) . toBe ( 'red ' ) ;
390
- expect ( bg . getAttribute ( ' stroke' ) ) . toBe ( 'blue ' ) ;
389
+ expect ( bg . style . fill ) . toBe ( 'rgb(255, 0, 0) ' ) ;
390
+ expect ( bg . style . stroke ) . toBe ( 'rgb(0, 0, 255) ' ) ;
391
391
expect ( bg . getAttribute ( 'stroke-width' ) ) . toBe ( '3' ) ;
392
392
} )
393
393
. then ( done , done . fail ) ;
0 commit comments