fix(web): convert pop up error as cancellation#1516
Conversation
|
You have run out of free Bugbot PR reviews for this billing cycle. This will reset on April 6. To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial. |
|
@cursoragent fix test failures |
|
Fixed the test failures. The tests were using synchronous queries ( Changes MadeI updated the failing tests in
This addresses timing issues in CI where elements weren't immediately available after render. All tests now pass locally (195 test suites, 1543 tests), and the changes have been committed and pushed to the branch. |
Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
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>
- 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.
fcb7eb7 to
e8137bb
Compare
… file - Adjusted the import statement in `google-oauth-error.util.test.ts` to reflect the new directory structure for better organization and clarity.
- 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.
- Deleted the `google-oauth-preview.png` and `logo.png` files from the assets directory as they are no longer needed, streamlining the asset management.
- 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.
- Changed the test command in package.json from "cross-env-shell" to "cross-env" for improved compatibility and consistency across environments.
- 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.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
- 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.


Fixes "Error: Popup window closed" in Posthog by treating Google OAuth popup cancellations as benign user actions instead of errors.