File tree Expand file tree Collapse file tree
assets/js/components/email-reporting/UserSettingsSelectionPanel Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -133,6 +133,31 @@ describe( 'UserSettingsSelectionPanel', () => {
133133 expect ( dialog ) . toHaveAttribute ( 'aria-hidden' , 'false' ) ;
134134 } ) ;
135135
136+ it ( 'hides admin screen tooltip when the panel opens' , async ( ) => {
137+ registry
138+ . dispatch ( CORE_UI )
139+ . setValue ( USER_SETTINGS_SELECTION_PANEL_OPENED_KEY , false ) ;
140+ registry . dispatch ( CORE_UI ) . setValue ( 'admin-screen-tooltip' , {
141+ isTooltipVisible : true ,
142+ } ) ;
143+
144+ render ( < UserSettingsSelectionPanel /> , {
145+ registry,
146+ features,
147+ viewContext : VIEW_CONTEXT_MAIN_DASHBOARD ,
148+ } ) ;
149+
150+ registry
151+ . dispatch ( CORE_UI )
152+ . setValue ( USER_SETTINGS_SELECTION_PANEL_OPENED_KEY , true ) ;
153+
154+ await waitFor ( ( ) =>
155+ expect (
156+ registry . select ( CORE_UI ) . getValue ( 'admin-screen-tooltip' )
157+ ) . toMatchObject ( { isTooltipVisible : false } )
158+ ) ;
159+ } ) ;
160+
136161 it ( 'calls saveEmailReportingSettings with subscribed true when subscribing' , async ( ) => {
137162 const coreUserDispatch = registry . dispatch ( CORE_USER ) ;
138163 const saveSpy = jest
You can’t perform that action at this time.
0 commit comments