import { CHART_VIZ_CONTAINER_SELECTOR , visitDynamicWidget } from '../../../../src/testing/selectors' ; it ( 'moves viewport when gestures are applied' , ( ) => { const START = new Date ( 2000 , 0 , 0 ) ; const END = new Date ( 2000 , 0 , 2 ) ; const OLD_Y_TICK_LABEL = 'Fri 31' ; visitDynamicWidget ( cy , { componentTag : 'sc-status-timeline' , viewportStart : START , viewportEnd : END , gestures : true , } ) ; cy . waitForStatusTimeline ( ) ; cy . contains ( OLD_Y_TICK_LABEL ) . should ( 'be.visible' ) ; cy . get ( CHART_VIZ_CONTAINER_SELECTOR ) . dblclick ( 'center' ) ; cy . contains ( OLD_Y_TICK_LABEL ) . should ( 'not.exist' ) ; } ) ; it ( 'does not move viewport when gestures are not applied' , ( ) => { const START = new Date ( 2000 , 0 , 0 ) ; const END = new Date ( 2000 , 0 , 2 ) ; const OLD_Y_TICK_LABEL = 'Fri 31' ; visitDynamicWidget ( cy , { componentTag : 'sc-status-timeline' , viewportStart : START , viewportEnd : END , gestures : false , } ) ; cy . waitForStatusTimeline ( ) ; cy . contains ( OLD_Y_TICK_LABEL ) . should ( 'be.visible' ) ; cy . get ( CHART_VIZ_CONTAINER_SELECTOR ) . dblclick ( 'center' ) ; cy . contains ( OLD_Y_TICK_LABEL ) . should ( 'be.visible' ) ; } ) ;