diff --git a/src/containers/my-cooperations/cooperation-completion/CooperationCompletion.tsx b/src/containers/my-cooperations/cooperation-completion/CooperationCompletion.tsx index 16cffa890..4b2d1a7c7 100644 --- a/src/containers/my-cooperations/cooperation-completion/CooperationCompletion.tsx +++ b/src/containers/my-cooperations/cooperation-completion/CooperationCompletion.tsx @@ -46,6 +46,7 @@ const CooperationCompletion: React.FC = ({ title={t('cooperationsPage.cooperationDetails.closeCooperationTitle')} > { const appSelect = screen.getByRole('combobox') expect(appSelect).toBeInTheDocument() + + const closeButton = screen.getByTestId('close-cooperation-btn') + expect(closeButton).toBeInTheDocument() + }) + + it('should call mockCloseCooperation when closing cooperation', async () => { + render( + + ) + + const closeButton = screen.getByTestId('close-cooperation-btn') + + fireEvent.click(closeButton) + + await waitFor(() => { + expect(mockOnCloseCooperation).toHaveBeenCalled() + }) }) })