@@ -556,111 +556,6 @@ part001 = startSketchOn(XZ)
556
556
)
557
557
}
558
558
} )
559
- test ( "Hovering and selection of extruded faces works, and is not overridden shortly after user's click" , async ( {
560
- page,
561
- homePage,
562
- scene,
563
- cmdBar,
564
- } ) => {
565
- await page . addInitScript ( async ( ) => {
566
- localStorage . setItem (
567
- 'persistCode' ,
568
- `@settings(defaultLengthUnit = in)
569
- sketch001 = startSketchOn(XZ)
570
- |> startProfile(at = [-79.26, 95.04])
571
- |> line(end = [112.54, 127.64])
572
- |> line(end = [170.36, -121.61], tag = $seg01)
573
- |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
574
- |> close()
575
- extrude001 = extrude(sketch001, length = 50)
576
- `
577
- )
578
- } )
579
- const u = await getUtils ( page )
580
- await page . setBodyDimensions ( { width : 1200 , height : 500 } )
581
-
582
- await homePage . goToModelingScene ( )
583
- await scene . settled ( cmdBar )
584
- await u . openAndClearDebugPanel ( )
585
-
586
- await u . sendCustomCmd ( {
587
- type : 'modeling_cmd_req' ,
588
- cmd_id : uuidv4 ( ) ,
589
- cmd : {
590
- type : 'default_camera_look_at' ,
591
- vantage : { x : 6615 , y : - 9505 , z : 10344 } ,
592
- center : { x : 1579 , y : - 635 , z : 4035 } ,
593
- up : { x : 0 , y : 0 , z : 1 } ,
594
- } ,
595
- } )
596
- await u . waitForCmdReceive ( 'default_camera_look_at' )
597
- await u . clearAndCloseDebugPanel ( )
598
-
599
- await page . waitForTimeout ( 1000 )
600
-
601
- let noHoverColor : [ number , number , number ] = [ 92 , 92 , 92 ]
602
- let hoverColor : [ number , number , number ] = [ 127 , 127 , 127 ]
603
- let selectColor : [ number , number , number ] = [ 155 , 155 , 105 ]
604
-
605
- const extrudeWall = { x : 670 , y : 275 }
606
- const extrudeText = `line(end = [170.36, -121.61], tag = $seg01)`
607
-
608
- const cap = { x : 594 , y : 283 }
609
- const capText = `startProfile(at = [-79.26, 95.04])`
610
-
611
- const nothing = { x : 946 , y : 229 }
612
-
613
- await expect
614
- . poll ( ( ) => u . getGreatestPixDiff ( extrudeWall , noHoverColor ) )
615
- . toBeLessThan ( 15 )
616
- await page . mouse . move ( nothing . x , nothing . y )
617
- await page . waitForTimeout ( 1000 )
618
- await page . mouse . move ( extrudeWall . x , extrudeWall . y )
619
- await expect ( page . getByTestId ( 'hover-highlight' ) . first ( ) ) . toBeVisible ( )
620
- await expect ( page . getByTestId ( 'hover-highlight' ) . first ( ) ) . toContainText (
621
- removeAfterFirstParenthesis ( extrudeText )
622
- )
623
- await page . waitForTimeout ( 1000 )
624
- await expect (
625
- await u . getGreatestPixDiff ( extrudeWall , hoverColor )
626
- ) . toBeLessThan ( 15 )
627
- await page . mouse . click ( extrudeWall . x , extrudeWall . y )
628
- await expect ( page . locator ( '.cm-activeLine' ) ) . toHaveText ( `|> ${ extrudeText } ` )
629
- await page . waitForTimeout ( 1000 )
630
- await expect (
631
- await u . getGreatestPixDiff ( extrudeWall , selectColor )
632
- ) . toBeLessThan ( 15 )
633
- await page . waitForTimeout ( 1000 )
634
- // check color stays there, i.e. not overridden (this was a bug previously)
635
- await expect (
636
- await u . getGreatestPixDiff ( extrudeWall , selectColor )
637
- ) . toBeLessThan ( 15 )
638
-
639
- await page . mouse . move ( nothing . x , nothing . y )
640
- await page . waitForTimeout ( 1000 )
641
- await expect ( page . getByTestId ( 'hover-highlight' ) ) . not . toBeVisible ( )
642
-
643
- // because of shading, color is not exact everywhere on the face
644
- noHoverColor = [ 115 , 115 , 115 ]
645
- hoverColor = [ 145 , 145 , 145 ]
646
- selectColor = [ 168 , 168 , 120 ]
647
-
648
- await expect ( await u . getGreatestPixDiff ( cap , noHoverColor ) ) . toBeLessThan ( 15 )
649
- await page . mouse . move ( cap . x , cap . y )
650
- await expect ( page . getByTestId ( 'hover-highlight' ) . first ( ) ) . toBeVisible ( )
651
- await expect ( page . getByTestId ( 'hover-highlight' ) . first ( ) ) . toContainText (
652
- removeAfterFirstParenthesis ( capText )
653
- )
654
- await page . waitForTimeout ( 1000 )
655
- await expect ( await u . getGreatestPixDiff ( cap , hoverColor ) ) . toBeLessThan ( 15 )
656
- await page . mouse . click ( cap . x , cap . y )
657
- await expect ( page . locator ( '.cm-activeLine' ) ) . toHaveText ( `|> ${ capText } ` )
658
- await page . waitForTimeout ( 1000 )
659
- await expect ( await u . getGreatestPixDiff ( cap , selectColor ) ) . toBeLessThan ( 15 )
660
- await page . waitForTimeout ( 1000 )
661
- // check color stays there, i.e. not overridden (this was a bug previously)
662
- await expect ( await u . getGreatestPixDiff ( cap , selectColor ) ) . toBeLessThan ( 15 )
663
- } )
664
559
test ( "Various pipe expressions should and shouldn't allow edit and or extrude" , async ( {
665
560
page,
666
561
homePage,
0 commit comments