From 5f62ba71465fcbd6d153bb03d5cb97fb83de911f Mon Sep 17 00:00:00 2001 From: kikootwo Date: Fri, 15 May 2026 15:12:31 -0400 Subject: [PATCH] Bump version to 1.2.0 and update tests Update package.json version to 1.2.0 and adjust tests to explicitly click the 'Cancel request' button. This adds an extra fireEvent.click for the 'Cancel request' role in RequestActionsDropdown.test.tsx and RequestCard.test.tsx to ensure the cancel handler is invoked reliably. Files changed: package.json, package-lock.json, tests/app/admin/components/RequestActionsDropdown.test.tsx, tests/components/requests/RequestCard.test.tsx. --- package-lock.json | 4 ++-- package.json | 2 +- tests/app/admin/components/RequestActionsDropdown.test.tsx | 1 + tests/components/requests/RequestCard.test.tsx | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index cc16af1..27dc820 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "readmeabook", - "version": "1.0.15", + "version": "1.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "readmeabook", - "version": "1.0.15", + "version": "1.2.0", "dependencies": { "@heroicons/react": "^2.2.0", "@prisma/client": "^6.19.0", diff --git a/package.json b/package.json index 51f1184..6aec224 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "readmeabook", - "version": "1.1.8", + "version": "1.2.0", "private": true, "scripts": { "dev": "next dev", diff --git a/tests/app/admin/components/RequestActionsDropdown.test.tsx b/tests/app/admin/components/RequestActionsDropdown.test.tsx index 53bd133..6bacb99 100644 --- a/tests/app/admin/components/RequestActionsDropdown.test.tsx +++ b/tests/app/admin/components/RequestActionsDropdown.test.tsx @@ -71,6 +71,7 @@ describe('RequestActionsDropdown', () => { fireEvent.click(screen.getByTitle('Actions')); fireEvent.click(screen.getByText('Cancel Request')); + fireEvent.click(screen.getByRole('button', { name: 'Cancel request' })); await waitFor(() => expect(onCancel).toHaveBeenCalledWith('req-1')); fireEvent.click(screen.getByTitle('Actions')); diff --git a/tests/components/requests/RequestCard.test.tsx b/tests/components/requests/RequestCard.test.tsx index 91ef818..468b31b 100644 --- a/tests/components/requests/RequestCard.test.tsx +++ b/tests/components/requests/RequestCard.test.tsx @@ -103,6 +103,7 @@ describe('RequestCard', () => { render(); fireEvent.click(screen.getByRole('button', { name: 'Cancel' })); + fireEvent.click(screen.getByRole('button', { name: 'Cancel request' })); await waitFor(() => { expect(cancelRequestMock).toHaveBeenCalledWith('req-1'); });