Commit 4c01f17
fix: multiple widgets for
* fix manage test error
* fix manage test error
* update useBookerContext
* wrap store provider around booker
* replace useStore with useBookerStoreContext
* replace useBookerStore with useBookerStoreContext
* add initializer function for booker store provider
* update props
* fixup: pass more props
* export StoreInitializeType type
* replace useBookerStore with useBookerStoreContext
* fixup: dont wrap BookerStoreProvider around booker directly
* wrap BookerStoreProvider around booker web wrapper and fix local storage import
* fix: wrap test components with BookerStoreProvider to fix failing unit tests
- Create reusable test utility in test-utils.tsx with comprehensive mock store
- Update Booker.test.tsx to use context-based testing approach
- Fix DatePicker tests in both bookings and calendars packages
- Simulate auto-advance behavior for month navigation tests
- All 14 previously failing tests now pass
Co-Authored-By: rajiv@cal.com <sahalrajiv6900@gmail.com>
* add changesets
* fix: complete migration from useBookerStore to useBookerStoreContext
- Updated all remaining files to use useBookerStoreContext instead of useBookerStore
- Fixed BookingFields.test.tsx by wrapping test component with BookerStoreProvider
- Ensures all Booker components work within the new context-based store pattern
- Resolves failing unit tests in CI by completing the store migration
Co-Authored-By: rajiv@cal.com <sahalrajiv6900@gmail.com>
* fix: add missing useBookerStoreContext import in BookerWebWrapper.tsx
- Fixes TypeScript errors in CI where useBookerStoreContext was used but not imported
- Completes the migration from useBookerStore to useBookerStoreContext pattern
- All tests pass locally after this fix
Co-Authored-By: rajiv@cal.com <sahalrajiv6900@gmail.com>
* Revert "fix: add missing useBookerStoreContext import in BookerWebWrapper.tsx"
This reverts commit 12947ca.
* Revert "fix: complete migration from useBookerStore to useBookerStoreContext"
This reverts commit 87d837f.
* fixup: useBookerStoreContext and useInitializeBookerStoreContext for booker web wrapper
* fixup: failing E2E tests
* fixup: email embed breaking
* fixup: troubleshooter crashing
* replace useBookerstore with useBookerStoreContext
---------
Co-authored-by: Rajiv Sahal <sahalrajiv-extc@atharvacoe.ac.in>
Co-authored-by: Ryukemeister <sahalrajiv6900@gmail.com>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Benny Joo <sldisek783@gmail.com>Booker atom (calcom#22925)1 parent d9817fc commit 4c01f17
32 files changed
Lines changed: 857 additions & 539 deletions
File tree
- .changeset
- packages
- features
- bookings
- Booker
- __tests__
- components
- BookEventForm
- OverlayCalendar
- hooks
- utils
- components
- calendars
- __tests__
- embed
- troubleshooter
- platform/atoms
- availability
- booker
- hooks
- bookings
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
42 | | - | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
89 | 95 | | |
90 | | - | |
91 | 96 | | |
92 | 97 | | |
93 | 98 | | |
| |||
100 | 105 | | |
101 | 106 | | |
102 | 107 | | |
103 | | - | |
| 108 | + | |
104 | 109 | | |
105 | 110 | | |
106 | 111 | | |
107 | 112 | | |
108 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
109 | 117 | | |
110 | 118 | | |
111 | 119 | | |
| |||
184 | 192 | | |
185 | 193 | | |
186 | 194 | | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
187 | 199 | | |
188 | 200 | | |
189 | 201 | | |
| |||
220 | 232 | | |
221 | 233 | | |
222 | 234 | | |
| 235 | + | |
223 | 236 | | |
224 | 237 | | |
225 | 238 | | |
| |||
312 | 325 | | |
313 | 326 | | |
314 | 327 | | |
315 | | - | |
316 | 328 | | |
317 | | - | |
318 | 329 | | |
319 | 330 | | |
320 | 331 | | |
| |||
394 | 405 | | |
395 | 406 | | |
396 | 407 | | |
| 408 | + | |
397 | 409 | | |
398 | 410 | | |
399 | 411 | | |
| |||
480 | 492 | | |
481 | 493 | | |
482 | 494 | | |
| 495 | + | |
483 | 496 | | |
484 | 497 | | |
485 | 498 | | |
| |||
552 | 565 | | |
553 | 566 | | |
554 | 567 | | |
555 | | - | |
556 | 568 | | |
557 | 569 | | |
558 | 570 | | |
| |||
571 | 583 | | |
572 | 584 | | |
573 | 585 | | |
574 | | - | |
575 | 586 | | |
576 | 587 | | |
577 | 588 | | |
| |||
Lines changed: 113 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
Lines changed: 19 additions & 50 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
| 20 | + | |
22 | 21 | | |
23 | 22 | | |
24 | | - | |
| 23 | + | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
| |||
87 | 86 | | |
88 | 87 | | |
89 | 88 | | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | 89 | | |
112 | 90 | | |
113 | 91 | | |
| |||
188 | 166 | | |
189 | 167 | | |
190 | 168 | | |
191 | | - | |
| 169 | + | |
192 | 170 | | |
193 | 171 | | |
194 | 172 | | |
195 | 173 | | |
196 | 174 | | |
197 | 175 | | |
198 | 176 | | |
199 | | - | |
200 | | - | |
201 | | - | |
| 177 | + | |
| 178 | + | |
202 | 179 | | |
203 | | - | |
204 | | - | |
205 | 180 | | |
206 | 181 | | |
207 | 182 | | |
208 | 183 | | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | 184 | | |
218 | 185 | | |
219 | 186 | | |
| |||
226 | 193 | | |
227 | 194 | | |
228 | 195 | | |
229 | | - | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
230 | 204 | | |
231 | 205 | | |
232 | 206 | | |
| |||
242 | 216 | | |
243 | 217 | | |
244 | 218 | | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | 219 | | |
250 | | - | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
251 | 223 | | |
252 | 224 | | |
253 | 225 | | |
| |||
267 | 239 | | |
268 | 240 | | |
269 | 241 | | |
270 | | - | |
271 | | - | |
272 | | - | |
| 242 | + | |
| 243 | + | |
273 | 244 | | |
274 | | - | |
275 | | - | |
276 | 245 | | |
277 | 246 | | |
278 | 247 | | |
| |||
0 commit comments