diff --git a/src/screens/MemberDetail/MemberDetail.test.tsx b/src/screens/MemberDetail/MemberDetail.test.tsx index 6a52ba41c5..6cd61296f6 100644 --- a/src/screens/MemberDetail/MemberDetail.test.tsx +++ b/src/screens/MemberDetail/MemberDetail.test.tsx @@ -172,6 +172,8 @@ describe('MemberDetail', () => { expect(screen.getAllByText(/Role/i)).toHaveLength(2); expect(screen.getAllByText(/Created/i)).toHaveLength(4); expect(screen.getAllByText(/Joined/i)).toHaveLength(2); + expect(screen.getByTestId('stateBtn')).toBeInTheDocument(); + userEvent.click(screen.getByTestId('stateBtn')); }); test('prettyDate function should work properly', () => { // If the date is provided @@ -250,12 +252,10 @@ describe('MemberDetail', () => { ) ); }); - test('should call setState with 2 when button is clicked', async () => { const props = { id: 'rishav-jha-mech', }; - const { container } = render( diff --git a/src/screens/MemberDetail/MemberDetail.tsx b/src/screens/MemberDetail/MemberDetail.tsx index 53f889e6f7..b243dfae98 100644 --- a/src/screens/MemberDetail/MemberDetail.tsx +++ b/src/screens/MemberDetail/MemberDetail.tsx @@ -106,6 +106,7 @@ const MemberDetail: React.FC = ({ id }): JSX.Element => {