@@ -7073,14 +7073,14 @@ describe('hoverlabel.showarrow', function() {
70737073 margin : { l : 50 , t : 50 , r : 50 , b : 50 }
70747074 } )
70757075 . then ( function ( ) {
7076- _hover ( 200 , 200 ) ; // Hover over middle point
7076+ _hover ( 200 , 70 ) ; // Hover over middle point
70777077 } )
70787078 . then ( delay ( HOVERMINTIME * 1.1 ) )
70797079 . then ( function ( ) {
70807080 var pathD = getHoverPath ( ) ;
70817081 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 )' ) ;
70847084 } )
70857085 . then ( done , done . fail ) ;
70867086 } ) ;
@@ -7098,15 +7098,15 @@ describe('hoverlabel.showarrow', function() {
70987098 hoverlabel : { showarrow : false }
70997099 } )
71007100 . then ( function ( ) {
7101- _hover ( 200 , 200 ) ; // Hover over middle point
7101+ _hover ( 200 , 70 ) ; // Hover over middle point
71027102 } )
71037103 . then ( delay ( HOVERMINTIME * 1.1 ) )
71047104 . then ( function ( ) {
71057105 var pathD = getHoverPath ( ) ;
71067106 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 ' ) ;
71107110 } )
71117111 . then ( done , done . fail ) ;
71127112 } ) ;
@@ -7124,13 +7124,13 @@ describe('hoverlabel.showarrow', function() {
71247124 margin : { l : 50 , t : 50 , r : 50 , b : 50 }
71257125 } )
71267126 . then ( function ( ) {
7127- _hover ( 200 , 200 ) ; // Hover over middle point
7127+ _hover ( 200 , 70 ) ; // Hover over middle point
71287128 } )
71297129 . then ( delay ( HOVERMINTIME * 1.1 ) )
71307130 . then ( function ( ) {
71317131 var pathD = getHoverPath ( ) ;
71327132 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' ) ;
71347134 } )
71357135 . then ( done , done . fail ) ;
71367136 } ) ;
0 commit comments