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.
This commit is contained in:
kikootwo
2026-05-15 15:12:31 -04:00
parent bc7fff9dd7
commit 5f62ba7146
4 changed files with 5 additions and 3 deletions
+2 -2
View File
@@ -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",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "readmeabook",
"version": "1.1.8",
"version": "1.2.0",
"private": true,
"scripts": {
"dev": "next dev",
@@ -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'));
@@ -103,6 +103,7 @@ describe('RequestCard', () => {
render(<RequestCard request={baseRequest} />);
fireEvent.click(screen.getByRole('button', { name: 'Cancel' }));
fireEvent.click(screen.getByRole('button', { name: 'Cancel request' }));
await waitFor(() => {
expect(cancelRequestMock).toHaveBeenCalledWith('req-1');
});