Commit b0b43c3
fix(web): convert pop up error as cancellation (#1516)
* fix(web): handle google popup-close oauth cancellations
Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
* fix(web): wait for elements in DayView route tests
Replace getByRole/getByText with findByRole/findByText to wait for
components to render before assertions. This fixes timing-related test
failures in CI where elements weren't immediately available after render.
Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
* refactor(middleware): streamline promise middleware and update imports
- Removed unused import from promise.middleware.test.ts to improve clarity.
- Simplified condition in sendResponse function of promise.middleware.ts for better readability.
- Updated import path for Google OAuth error utility in useGoogleLogin.ts to reflect new directory structure.
* fix(tests): update import path for Google OAuth error utility in test file
- Adjusted the import statement in `google-oauth-error.util.test.ts` to reflect the new directory structure for better organization and clarity.
* refactor(migrations): remove console logs and enhance migration logic
- Eliminated console log statements from data and external migration functions to reduce clutter and improve performance.
- Updated the demo data seed migration to skip seeding when existing data is present, enhancing efficiency.
- Added console method spies in test files to control logging behavior during tests, improving test clarity and reducing noise.
* chore(assets): remove unused Google OAuth and logo images
- Deleted the `google-oauth-preview.png` and `logo.png` files from the assets directory as they are no longer needed, streamlining the asset management.
* refactor(tests): update rendering methods and improve test setup
- Replaced synchronous rendering methods with asynchronous counterparts in various test files to ensure proper initialization and avoid timing issues.
- Updated utility functions to prepare storage for tests, enhancing the clarity and reliability of the test environment.
- Removed unused imports and streamlined test setups across multiple components, improving overall code organization and readability.
* fix(tests): update test command in package.json for consistency
- Changed the test command in package.json from "cross-env-shell" to "cross-env" for improved compatibility and consistency across environments.
* refactor(Task): improve drag handle visibility and floating behavior
- Updated the DraggableTask component to conditionally enable the drag handle based on the number of tasks, enhancing user experience.
- Refactored the floating behavior to only activate when the drag handle is visible and not in test environments, improving performance and reliability.
- Simplified the reference setting logic for the floating element, ensuring it only attaches when necessary.
* test(floating-ui): add mock setup for floating-ui in tests
- Introduced a new setup file to mock @floating-ui/react, allowing tests to run without real layout calculations.
- Updated TaskContextMenu and TaskList test files to include the new floating-ui mock, ensuring consistent behavior across tests.
- Simplified the DraggableTask component by removing environment checks for floating behavior, enhancing test reliability.
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>1 parent afd5eca commit b0b43c3
28 files changed
Lines changed: 349 additions & 132 deletions
File tree
- packages
- backend/src/common/middleware
- web/src
- __tests__
- __mocks__
- utils
- storage
- tasks
- assets/png
- auth
- google
- hooks/oauth
- common/storage
- adapter
- migrations
- external
- components/oauth/google
- ducks/events
- sagas
- slices
- views/Day
- components
- ContextMenu
- TaskList
- Task
- util
- view
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
Lines changed: 1 addition & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
| 30 | + | |
34 | 31 | | |
35 | 32 | | |
36 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
50 | 49 | | |
51 | 50 | | |
52 | 51 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | 52 | | |
60 | 53 | | |
61 | 54 | | |
| |||
91 | 84 | | |
92 | 85 | | |
93 | 86 | | |
| 87 | + | |
94 | 88 | | |
95 | 89 | | |
96 | 90 | | |
| |||
103 | 97 | | |
104 | 98 | | |
105 | 99 | | |
106 | | - | |
| 100 | + | |
107 | 101 | | |
108 | 102 | | |
109 | 103 | | |
| |||
| 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 | + | |
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
35 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
| |||
58 | 60 | | |
59 | 61 | | |
60 | 62 | | |
61 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
62 | 66 | | |
63 | 67 | | |
64 | 68 | | |
| |||
Binary file not shown.
Binary file not shown.
Lines changed: 18 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 | + | |
0 commit comments