File tree Expand file tree Collapse file tree
layout-engine/painters/dom/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2942,13 +2942,16 @@ describe('DomPainter', () => {
29422942 painter . setActiveComment ( 'comment-A' ) ;
29432943 painter . paint ( paragraphLayout , mount ) ;
29442944 span = mount . querySelector ( '.superdoc-comment-highlight' ) as HTMLElement ;
2945- expect ( span . style . backgroundColor ) . not . toBe ( '' ) ;
2945+ const activeColor = span . style . backgroundColor ;
2946+ expect ( activeColor ) . not . toBe ( '' ) ;
29462947
2947- // Select a different comment (comment-B): should NOT be highlighted
2948+ // Select a different comment (comment-B): should show faded highlight
29482949 painter . setActiveComment ( 'comment-B' ) ;
29492950 painter . paint ( paragraphLayout , mount ) ;
29502951 span = mount . querySelector ( '.superdoc-comment-highlight' ) as HTMLElement ;
2951- expect ( span . style . backgroundColor ) . toBe ( '' ) ; // Not highlighted because active comment doesn't match
2952+ // Inactive comments get a faded background instead of being invisible
2953+ expect ( span . style . backgroundColor ) . not . toBe ( '' ) ;
2954+ expect ( span . style . backgroundColor ) . not . toBe ( activeColor ) ;
29522955 } ) ;
29532956
29542957 it ( 'shows nested comment indicators when outer comment is selected' , ( ) => {
Original file line number Diff line number Diff line change @@ -562,7 +562,8 @@ describe('SuperDoc.vue', () => {
562562 await nextTick ( ) ;
563563 const toggleArg = superdocStub . broadcastSidebarToggle . mock . calls . at ( - 1 ) [ 0 ] ;
564564 expect ( toggleArg ) . toEqual ( expect . objectContaining ( { commentId : 'new' } ) ) ;
565- expect ( wrapper . findComponent ( CommentDialogStub ) . exists ( ) ) . toBe ( true ) ;
565+ // CommentDialog is now rendered inside FloatingComments, so check for that instead
566+ expect ( wrapper . findComponent ( FloatingCommentsStub ) . exists ( ) ) . toBe ( true ) ;
566567
567568 superdocStoreStub . isReady . value = true ;
568569 await nextTick ( ) ;
You can’t perform that action at this time.
0 commit comments