Skip to content

Conversation

hariombalhara
Copy link
Member

@hariombalhara hariombalhara commented Feb 1, 2025

What does this PR do?

  • Adds reusable mocks for various dependencies of Booker.tsx
  • Adds few tests for Booker
    • Dry Run Message verification
    • Invalidate schedule happens when doing 'Cancel' on booking form
    • Slot no longer available case verification

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

yarn test Booker.test.tsx

Hariom Balhara added 9 commits January 28, 2025 14:01
- Added new environment variables for configuring slot reservation and availability checks
- Implemented strategies to handle concurrent bookings and slot availability
- Updated Booker component and related files to support new reservation and slot checking mechanisms
- Added README with detailed explanation of booking prevention strategies
- Configured dynamic intervals for slot and reservation queries
…ility explanation

- Clarified slot reservation behavior when multiple users access the same booking page
- Added details about `getSchedule` refetching strategies and timing
- Explained how slot availability is detected and communicated to users
- Refactored slot availability checking to support multiple slots
- Added tentative selected timeslots to improve booking UX
- Updated trpc handler to check availability for multiple slots
- Introduced new store methods for managing tentative slot selections
- Improved slot reservation and availability status tracking
- Renamed and restructured slot availability check parameters
- Extracted quick availability checks into a separate hook
- Updated type definitions for slot status and availability checks
- Simplified slot availability logic in Booker and related components
- Maintained cached state for quick availability checks
@CLAassistant
Copy link

CLAassistant commented Feb 1, 2025

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 3 committers have signed the CLA.

✅ Udit-takkar
✅ ThyMinimalDev
❌ Hariom Balhara


Hariom Balhara seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Contributor

github-actions bot commented Feb 1, 2025

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:

No release type found in pull request title "Add tests booker". Add a prefix to indicate what kind of release this pull request corresponds to. For reference, see https://www.conventionalcommits.org/

Available types:
 - feat: A new feature
 - fix: A bug fix
 - docs: Documentation only changes
 - style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
 - refactor: A code change that neither fixes a bug nor adds a feature
 - perf: A code change that improves performance
 - test: Adding missing tests or correcting existing tests
 - build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
 - ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
 - chore: Other changes that don't modify src or test files
 - revert: Reverts a previous commit

Copy link

vercel bot commented Feb 1, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
cal-com-ui-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 18, 2025 10:48am
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Visit Preview Mar 18, 2025 10:48am
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview Mar 18, 2025 10:48am

@hariombalhara hariombalhara marked this pull request as ready for review February 25, 2025 07:23
@graphite-app graphite-app bot requested review from a team February 25, 2025 07:23
@dosubot dosubot bot added the automated-tests area: unit tests, e2e tests, playwright label Feb 25, 2025
Copy link

graphite-app bot commented Feb 25, 2025

Graphite Automations

"Add consumer team as reviewer" took an action on this PR • (02/25/25)

1 reviewer was added to this PR based on Keith Williams's automation.

"Add foundation team as reviewer" took an action on this PR • (02/25/25)

1 reviewer was added to this PR based on Keith Williams's automation.

ThyMinimalDev
ThyMinimalDev previously approved these changes Feb 26, 2025
Copy link
Contributor

@ThyMinimalDev ThyMinimalDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

Base automatically changed from dont-allow-booking-form-with-unavaialble-slot to main February 26, 2025 14:49
@hariombalhara hariombalhara dismissed ThyMinimalDev’s stale review February 26, 2025 14:49

The base branch was changed.

@ThyMinimalDev ThyMinimalDev requested a review from a team as a code owner February 26, 2025 14:49
@github-actions github-actions bot added the ❗️ .env changes contains changes to env variables label Mar 18, 2025
CarinaWolli
CarinaWolli previously approved these changes Mar 18, 2025
Copy link
Contributor

github-actions bot commented Mar 18, 2025

E2E results are ready!

@CarinaWolli CarinaWolli merged commit 07c38f1 into main Mar 18, 2025
58 of 63 checks passed
@CarinaWolli CarinaWolli deleted the add-tests-booker branch March 18, 2025 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automated-tests area: unit tests, e2e tests, playwright core area: core, team members only enterprise area: enterprise, audit log, organisation, SAML, SSO ❗️ .env changes contains changes to env variables ready-for-e2e
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants