@@ -95,20 +95,22 @@ describe('ReviewsController', function() {
9595 assert . strictEqual ( opWrapper . find ( ReviewsView ) . prop ( 'extra' ) , extra ) ;
9696 } ) ;
9797
98- it ( 'scrolls to a specific thread on mount' , function ( ) {
98+ it ( 'scrolls to and highlight a specific thread on mount' , function ( ) {
9999 clock = sinon . useFakeTimers ( ) ;
100100 const wrapper = shallow ( buildApp ( { initThreadID : 'thread0' } ) ) ;
101101 let opWrapper = wrapper . find ( PullRequestCheckoutController ) . renderProp ( 'children' ) ( noop ) ;
102102
103103 assert . include ( opWrapper . find ( ReviewsView ) . prop ( 'threadIDsOpen' ) , 'thread0' ) ;
104+ assert . include ( opWrapper . find ( ReviewsView ) . prop ( 'highlightedThreadIDs' ) , 'thread0' ) ;
104105 assert . strictEqual ( opWrapper . find ( ReviewsView ) . prop ( 'scrollToThreadID' ) , 'thread0' ) ;
105106
106107 clock . tick ( 2000 ) ;
107108 opWrapper = wrapper . find ( PullRequestCheckoutController ) . renderProp ( 'children' ) ( noop ) ;
109+ assert . notInclude ( opWrapper . find ( ReviewsView ) . prop ( 'highlightedThreadIDs' ) , 'thread0' ) ;
108110 assert . isNull ( opWrapper . find ( ReviewsView ) . prop ( 'scrollToThreadID' ) ) ;
109111 } ) ;
110112
111- it ( 'scrolls to a specific thread on update' , function ( ) {
113+ it ( 'scrolls to and highlight a specific thread on update' , function ( ) {
112114 clock = sinon . useFakeTimers ( ) ;
113115 const wrapper = shallow ( buildApp ( ) ) ;
114116 let opWrapper = wrapper . find ( PullRequestCheckoutController ) . renderProp ( 'children' ) ( noop ) ;
@@ -118,11 +120,13 @@ describe('ReviewsController', function() {
118120 opWrapper = wrapper . find ( PullRequestCheckoutController ) . renderProp ( 'children' ) ( noop ) ;
119121
120122 assert . include ( opWrapper . find ( ReviewsView ) . prop ( 'threadIDsOpen' ) , 'hang-by-a-thread' ) ;
123+ assert . include ( opWrapper . find ( ReviewsView ) . prop ( 'highlightedThreadIDs' ) , 'hang-by-a-thread' ) ;
121124 assert . isTrue ( opWrapper . find ( ReviewsView ) . prop ( 'commentSectionOpen' ) ) ;
122125 assert . strictEqual ( opWrapper . find ( ReviewsView ) . prop ( 'scrollToThreadID' ) , 'hang-by-a-thread' ) ;
123126
124127 clock . tick ( 2000 ) ;
125128 opWrapper = wrapper . find ( PullRequestCheckoutController ) . renderProp ( 'children' ) ( noop ) ;
129+ assert . notInclude ( opWrapper . find ( ReviewsView ) . prop ( 'highlightedThreadIDs' ) , 'hang-by-a-thread' ) ;
126130 assert . isNull ( opWrapper . find ( ReviewsView ) . prop ( 'scrollToThreadID' ) ) ;
127131 } ) ;
128132
0 commit comments