test(medium): Refactor Bluetooth auto-connect race fix and improve test stability#9365
Conversation
- Remove `NoSavedDeviceError` class in `hooks/useBluetoothHRM.ts` and use standard `Error` with 'NO_SAVED_DEVICE' message. - Update `checkAccessibility` in `tests/playwright/lib/accessibility.ts` to unconditionally include the selector, ensuring tests fail if target is missing. - Remove arbitrary `waitForTimeout` in `tests/playwright/vrt-components.spec.ts`. - Remove deprecated `TEST_CONTROLS` from `types/global.d.ts`. - Increase global Playwright timeout to 30s in `playwright.config.ts`. Co-authored-by: arii <342438+arii@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
- Remove `NoSavedDeviceError` class in `hooks/useBluetoothHRM.ts` and use standard `Error` with 'NO_SAVED_DEVICE' message. - Update `checkAccessibility` in `tests/playwright/lib/accessibility.ts` to unconditionally include the selector, ensuring tests fail if target is missing. - Remove arbitrary `waitForTimeout` in `tests/playwright/vrt-components.spec.ts`. - Remove deprecated `TEST_CONTROLS` from `types/global.d.ts`. - Increase global Playwright timeout to 30s in `playwright.config.ts`. - Fix linting issues (Prettier) in `hooks/useBluetoothHRM.ts`. Co-authored-by: arii <342438+arii@users.noreply.github.com>
…nto fix-bluetooth-auto-connect-race-17140583504697442733-6813176962091842909
Description
This PR refactors the Bluetooth auto-connect race fix and improves test stability. It implements architectural improvements and fixes identified in PR #9315 code review directives.
Change Type: 🐛 Bug fix (non-breaking change fixing an issue)
Changes Made
hooks/useBluetoothHRM.ts: Replaced customNoSavedDeviceErrorwith standardErrorto reduce boilerplate.tests/playwright/lib/accessibility.ts: Removed defensive existence check to prevent false positives when testing specific elements.tests/playwright/vrt-components.spec.ts: Removed flakywaitForTimeout.types/global.d.ts: Cleaned up deprecated type definitions.playwright.config.ts: Increased global timeout to reduce CI flakiness.Testing
This PR primarily impacts testing by improving test stability and configuration. It includes specific changes to Playwright tests and updates to the Playwright configuration to increase the global timeout, aiming to reduce CI flakiness.
Related Issues
Closes #9315
Original PR Body
Implemented architectural improvements and fixes identified in PR #9315 code review directives.
hooks/useBluetoothHRM.ts: Replaced customNoSavedDeviceErrorwith standardErrorto reduce boilerplate.tests/playwright/lib/accessibility.ts: Removed defensive existence check to prevent false positives when testing specific elements.tests/playwright/vrt-components.spec.ts: Removed flakywaitForTimeout.types/global.d.ts: Cleaned up deprecated type definitions.playwright.config.ts: Increased global timeout to reduce CI flakiness.PR created automatically by Jules for task 6813176962091842909 started by @arii