@@ -115,9 +115,8 @@ describe('partnerGivingAnalysis page', () => {
115115 } ) ;
116116
117117 it ( 'renders filters panel' , async ( ) => {
118- const { getByRole , findByRole } = render ( < TestingComponent /> ) ;
118+ const { findByRole } = render ( < TestingComponent /> ) ;
119119
120- userEvent . click ( getByRole ( 'img' , { name : 'Toggle Filter Panel' } ) ) ;
121120 expect ( await findByRole ( 'heading' , { name : 'Filter' } ) ) . toBeInTheDocument ( ) ;
122121 } ) ;
123122
@@ -128,11 +127,11 @@ describe('partnerGivingAnalysis page', () => {
128127
129128 const leftPanel = getByTestId ( 'SidePanelsLayoutLeftPanel' ) ;
130129
131- userEvent . click ( getByRole ( 'button' , { name : 'Toggle Filter Panel' } ) ) ;
132- expect ( leftPanel ) . toHaveStyle ( 'transform: none' ) ;
133-
134130 userEvent . click ( await findByTestId ( 'FilterPanelClose' ) ) ;
135131 expect ( leftPanel ) . toHaveStyle ( 'transform: translate(-100%)' ) ;
132+
133+ userEvent . click ( getByRole ( 'button' , { name : 'Toggle Filter Panel' } ) ) ;
134+ expect ( leftPanel ) . toHaveStyle ( 'transform: none' ) ;
136135 } ) ;
137136
138137 it ( 'changes the URL when a contact is selected' , async ( ) => {
@@ -162,7 +161,6 @@ describe('partnerGivingAnalysis page', () => {
162161 ) ;
163162 const searchBar = getByPlaceholderText ( 'Search Contacts' ) ;
164163 userEvent . type ( searchBar , 'John' ) ;
165- userEvent . click ( getByRole ( 'button' , { name : 'Toggle Filter Panel' } ) ) ;
166164 userEvent . click (
167165 await findByRole ( 'combobox' , { name : 'Designation Account' } ) ,
168166 ) ;
0 commit comments