test: test cases for POST selected-calendars#15873
test: test cases for POST selected-calendars#15873keithwillcode merged 2 commits intocalcom:mainfrom
Conversation
|
@Lucas13032003 is attempting to deploy a commit to the cal Team on Vercel. A member of the Team first needs to authorize it. |
|
Hey there and thank you for opening this pull request! 👋🏼 We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted. Details: |
Graphite Automations"Add community label" took an action on this PR • (07/23/24)1 label was added to this PR based on Keith Williams's automation. "Add consumer team as reviewer" took an action on this PR • (07/23/24)1 reviewer was added to this PR based on Keith Williams's automation. |
| }); | ||
|
|
||
| req.userId = 333333; | ||
| req.isSystemWideAdmin = false; |
There was a problem hiding this comment.
For a non admin user you don't need to explicitly set req.isSystemWideAdmin = false, you can remove it.
📦 Next.js Bundle Analysis for @calcom/webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 Eighty-four Pages Changed SizeThe following pages changed size from the code in this PR compared to its base branch:
DetailsOnly the gzipped size is provided here based on an expert tip. First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If Any third party scripts you have added directly to your app using the The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored. |
anikdhabal
left a comment
There was a problem hiding this comment.
LGTM! Great work @Lucas13032003
What does this PR do?
This PR adds unit tests for the POST /api/selected-calendars endpoint. It tests various scenarios including:
userIdin the body.Mandatory Tasks (DO NOT REMOVE)
How should this be tested?
userIdin the request body.No additional environment variables are required for these tests.
Ensure that mock data is in place for user and selected calendar entities.
For valid requests, the endpoint should create a selected calendar and return a 200 status code with the expected response data.
Make sure to run the tests in an environment where the Prisma client is properly mocked.
Checklist