@@ -8,6 +8,7 @@ import { recommendationsSelector, resetRecommendationsHighlighting } from 'uiSrc
8
8
import { InsightsPanelTabs } from 'uiSrc/slices/interfaces/insights'
9
9
import { sendEventTelemetry , TelemetryEvent } from 'uiSrc/telemetry'
10
10
import { Pages } from 'uiSrc/constants'
11
+ import { removeFeatureFromHighlighting } from 'uiSrc/slices/app/features'
11
12
import InsightsTrigger from './InsightsTrigger'
12
13
13
14
let store : typeof mockedStore
@@ -49,7 +50,7 @@ describe('InsightsTrigger', () => {
49
50
50
51
fireEvent . click ( screen . getByTestId ( 'insights-trigger' ) )
51
52
52
- expect ( store . getActions ( ) ) . toEqual ( [ toggleInsightsPanel ( ) ] )
53
+ expect ( store . getActions ( ) ) . toEqual ( [ toggleInsightsPanel ( ) , removeFeatureFromHighlighting ( 'insights' ) ] )
53
54
} )
54
55
55
56
it ( 'should call proper actions after click on the button when there are any recommendations' , ( ) => {
@@ -63,7 +64,8 @@ describe('InsightsTrigger', () => {
63
64
expect ( store . getActions ( ) ) . toEqual ( [
64
65
resetRecommendationsHighlighting ( ) ,
65
66
changeSelectedTab ( InsightsPanelTabs . Recommendations ) ,
66
- toggleInsightsPanel ( )
67
+ toggleInsightsPanel ( ) ,
68
+ removeFeatureFromHighlighting ( 'insights' )
67
69
] )
68
70
} )
69
71
@@ -89,8 +91,8 @@ describe('InsightsTrigger', () => {
89
91
page : '/browser' ,
90
92
tab : 'recommendations'
91
93
} ,
92
- } )
94
+ } ) ;
93
95
94
- sendEventTelemetry . mockRestore ( )
96
+ ( sendEventTelemetry as jest . Mock ) . mockRestore ( )
95
97
} )
96
98
} )
0 commit comments