Commit 0be5c93
test(web): run isolated web suite directly (#1848)
* test(web): batch interim test runner
* test(web): isolate direct bun suite
* test(web): fix useGridLayout test stability in CI
- Override getBoundingClientRect on BOTH HTMLElement.prototype and
window.HTMLElement.prototype since JSDOM may use a different
HTMLElement internally than globalThis
- Use hardcoded test rects based on testid for consistent values
- Remove intermediate ref callbacks, use hook refs directly
- Move ResizeObserver mock setup to beforeEach for consistent timing
- Replace waitFor with direct assertions after explicit timeout
- Reset motion state in beforeEach/afterEach
The tests were failing in CI because:
1. JSDOM creates its own HTMLElement class assigned to window.HTMLElement
2. Elements created by JSDOM use window.HTMLElement.prototype
3. Only overriding globalThis.HTMLElement.prototype wasn't sufficient
4. Must override both prototypes to ensure the mock is used
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* test(web): use renderHook for useGridLayout tests
Use the canonical test pattern with renderHook and mock elements rather
than rendering full components with prototype-level getBoundingClientRect
overrides. This approach is consistent with useCalendarGridLayout tests
and avoids CI-specific prototype override issues.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* test(web): remove redundant useGridLayout test
The useGridLayout hook is a thin wrapper around useCalendarGridLayout
that passes DAYS_IN_VIEW=7 and isWeekInteractionMotionActive. All
functionality is already covered by useCalendarGridLayout.test.tsx
which tests the same 7-day layout measurements.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* chore: replace run.ts with native bun cmds
* fix(backend): address base api network scenario
* chore(web): re-add PlannerSidebar tests
* fix(web): restore planner sidebar shortcuts overlay
The createPlannerSidebar refactor imported the fixed-position shortcut
hint overlay instead of the sidebar modal, which blocked sidebar clicks
in e2e tests and ignored isShortcutsOpen.
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent 4b9ac43 commit 0be5c93
70 files changed
Lines changed: 1324 additions & 1635 deletions
File tree
- docs/development
- packages
- scripts/src/testing
- web/src
- __tests__
- auth
- compass
- hooks
- session
- google
- hooks/useIsGoogleAvailable
- util
- common
- apis/base
- hooks
- repositories/event
- utils
- draft
- form
- sync
- components
- AuthModal
- hooks
- AuthenticatedLayout
- ContextMenu
- HeaderInfoIcon
- MobileGate
- PlannerSidebar
- PlannerAccountSummary
- PlannerSidebarActions
- SomedayEventSections
- SomedayEvents/SomedayEventsContainer
- draft/hooks
- SelectView
- ducks/events/sagas
- sse
- hooks
- provider
- views
- Day
- components
- Tasks
- Toasts
- MigrationToast
- UndoToast
- context/__tests__
- hooks/tasks
- Forms
- ActionsMenu
- EventForm
- DateControlsSection/RecurrenceSection
- hooks
- Week
- components/Draft/hooks/actions
- hooks/grid
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | | - | |
| 48 | + | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
119 | 127 | | |
120 | 128 | | |
121 | 129 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| |||
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
277 | 303 | | |
278 | 304 | | |
279 | 305 | | |
| |||
282 | 308 | | |
283 | 309 | | |
284 | 310 | | |
| 311 | + | |
| 312 | + | |
285 | 313 | | |
286 | 314 | | |
287 | 315 | | |
| |||
Lines changed: 43 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 | + | |
0 commit comments