diff --git a/src/components/OrganizationScreen/OrganizationScreen.test.tsx b/src/components/OrganizationScreen/OrganizationScreen.test.tsx index a1fefd64da..46f350be01 100644 --- a/src/components/OrganizationScreen/OrganizationScreen.test.tsx +++ b/src/components/OrganizationScreen/OrganizationScreen.test.tsx @@ -81,17 +81,19 @@ describe('Testing OrganizationScreen', () => { fireEvent.click(closeButton); // Check for contract class after closing - expect( - screen.getByTestId('mainpageright').className.includes('expand'), - ).toBeTruthy(); + expect(screen.getByTestId('mainpageright')).toHaveAttribute( + 'data-expanded', + 'true', + ); const openButton = screen.getByTestId('openMenu'); fireEvent.click(openButton); // Check for expand class after opening - expect( - screen.getByTestId('mainpageright').className.includes('contract'), - ).toBeTruthy(); + expect(screen.getByTestId('mainpageright')).toHaveAttribute( + 'data-expanded', + 'false', + ); }); test('handles window resize', () => { diff --git a/src/components/OrganizationScreen/OrganizationScreen.tsx b/src/components/OrganizationScreen/OrganizationScreen.tsx index 85fb6ee181..f4c96c90a4 100644 --- a/src/components/OrganizationScreen/OrganizationScreen.tsx +++ b/src/components/OrganizationScreen/OrganizationScreen.tsx @@ -146,6 +146,7 @@ const OrganizationScreen = (): JSX.Element => { : styles.contract } `} data-testid="mainpageright" + data-expanded={hideDrawer === null ? '' : hideDrawer ? 'true' : 'false'} >