@@ -7073,14 +7073,14 @@ describe('hoverlabel.showarrow', function() {
7073
7073
margin : { l : 50 , t : 50 , r : 50 , b : 50 }
7074
7074
} )
7075
7075
. then ( function ( ) {
7076
- _hover ( 200 , 200 ) ; // Hover over middle point
7076
+ _hover ( 200 , 70 ) ; // Hover over middle point
7077
7077
} )
7078
7078
. then ( delay ( HOVERMINTIME * 1.1 ) )
7079
7079
. then ( function ( ) {
7080
7080
var pathD = getHoverPath ( ) ;
7081
7081
expect ( pathD ) . not . toBeNull ( 'hover path should exist' ) ;
7082
- // Arrow paths contain 'L' commands for the triangular pointer
7083
- expect ( pathD ) . toMatch ( / M 0 , 0 L / , 'path should contain arrow (L command from origin )' ) ;
7082
+ // Arrow paths contain 'L' commands starting from 0,0
7083
+ expect ( pathD ) . toMatch ( / ^ M 0 , 0 L / , 'path should contain arrow (L command from 0,0 )' ) ;
7084
7084
} )
7085
7085
. then ( done , done . fail ) ;
7086
7086
} ) ;
@@ -7098,15 +7098,15 @@ describe('hoverlabel.showarrow', function() {
7098
7098
hoverlabel : { showarrow : false }
7099
7099
} )
7100
7100
. then ( function ( ) {
7101
- _hover ( 200 , 200 ) ; // Hover over middle point
7101
+ _hover ( 200 , 70 ) ; // Hover over middle point
7102
7102
} )
7103
7103
. then ( delay ( HOVERMINTIME * 1.1 ) )
7104
7104
. then ( function ( ) {
7105
7105
var pathD = getHoverPath ( ) ;
7106
7106
expect ( pathD ) . not . toBeNull ( 'hover path should exist' ) ;
7107
- // No-arrow paths should be simple rectangles (no 'L' commands from origin )
7108
- expect ( pathD ) . not . toMatch ( / M 0 , 0 L / , 'path should not contain arrow ' ) ;
7109
- expect ( pathD ) . toMatch ( / ^ M - / , 'path should start with rectangle (M- for left edge) ' ) ;
7107
+ // No-arrow paths should be simple rectangles (no 'L' commands starting at 0,0) )
7108
+ expect ( pathD ) . not . toMatch ( / ^ M 0 , 0 L / , 'path should not start at 0,0 ' ) ;
7109
+ expect ( pathD ) . toMatch ( / ^ M [ \d . - ] + , [ \d . - ] + h / , 'path should start with some numeric point and move horizontally ' ) ;
7110
7110
} )
7111
7111
. then ( done , done . fail ) ;
7112
7112
} ) ;
@@ -7124,13 +7124,13 @@ describe('hoverlabel.showarrow', function() {
7124
7124
margin : { l : 50 , t : 50 , r : 50 , b : 50 }
7125
7125
} )
7126
7126
. then ( function ( ) {
7127
- _hover ( 200 , 200 ) ; // Hover over middle point
7127
+ _hover ( 200 , 70 ) ; // Hover over middle point
7128
7128
} )
7129
7129
. then ( delay ( HOVERMINTIME * 1.1 ) )
7130
7130
. then ( function ( ) {
7131
7131
var pathD = getHoverPath ( ) ;
7132
7132
expect ( pathD ) . not . toBeNull ( 'hover path should exist' ) ;
7133
- expect ( pathD ) . not . toMatch ( / M 0 , 0 L / , 'trace-level showarrow:false should hide arrow' ) ;
7133
+ expect ( pathD ) . not . toMatch ( / ^ M 0 , 0 L / , 'trace-level showarrow:false should hide arrow' ) ;
7134
7134
} )
7135
7135
. then ( done , done . fail ) ;
7136
7136
} ) ;
0 commit comments