@ -137,6 +137,15 @@ context('Redraw feature.', () => {
cy . get ( '.cvat-canvas-container' )
cy . get ( '.cvat-canvas-container' )
. click ( createCuboidShape2Points . firstX , createCuboidShape2Points . firstY - 50 )
. click ( createCuboidShape2Points . firstX , createCuboidShape2Points . firstY - 50 )
. click ( createCuboidShape2Points . secondX , createCuboidShape2Points . secondY - 50 ) ;
. click ( createCuboidShape2Points . secondX , createCuboidShape2Points . secondY - 50 ) ;
// Check issue 3219. Press "N" during the redrawing of the cuboid
cy . get ( '.cvat-canvas-container' ) . trigger ( 'mousemove' , 350 , 300 ) ;
cy . get ( '#cvat_canvas_shape_5' ) . should ( 'have.class' , 'cvat_canvas_shape_activated' ) ;
cy . get ( 'body' ) . trigger ( 'keydown' , { keyCode : keyCodeN , shiftKey : true } ) ; // Start redraw the cuboid
cy . get ( '.cvat-canvas-container' )
. click ( createCuboidShape2Points . firstX , createCuboidShape2Points . firstY - 100 )
. trigger ( 'mousemove' , createCuboidShape2Points . secondX , createCuboidShape2Points . secondY - 100 ) ;
cy . get ( 'body' ) . trigger ( 'keydown' , { keyCode : keyCodeN } ) ;
cy . get ( '.cvat_canvas_shape_drawing' ) . should ( 'not.exist' ) ;
cy . get ( '.cvat_canvas_shape' ) . then ( ( $shape ) => {
cy . get ( '.cvat_canvas_shape' ) . then ( ( $shape ) => {
expect ( $shape . length ) . to . be . equal ( 5 ) ;
expect ( $shape . length ) . to . be . equal ( 5 ) ;
} ) ;
} ) ;