Skip to content

test(medium): Refactor Bluetooth auto-connect race fix and improve test stability#9365

Closed
arii wants to merge 3 commits intofix-bluetooth-auto-connect-race-17140583504697442733from
fix-bluetooth-auto-connect-race-17140583504697442733-6813176962091842909
Closed

test(medium): Refactor Bluetooth auto-connect race fix and improve test stability#9365
arii wants to merge 3 commits intofix-bluetooth-auto-connect-race-17140583504697442733from
fix-bluetooth-auto-connect-race-17140583504697442733-6813176962091842909

Conversation

@arii
Copy link
Owner

@arii arii commented Feb 26, 2026

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

  • Refactor hooks/useBluetoothHRM.ts: Replaced custom NoSavedDeviceError with standard Error to reduce boilerplate.
  • Refactor tests/playwright/lib/accessibility.ts: Removed defensive existence check to prevent false positives when testing specific elements.
  • Refactor tests/playwright/vrt-components.spec.ts: Removed flaky waitForTimeout.
  • Update types/global.d.ts: Cleaned up deprecated type definitions.
  • Update 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.

  1. Refactor hooks/useBluetoothHRM.ts: Replaced custom NoSavedDeviceError with standard Error to reduce boilerplate.
  2. Refactor tests/playwright/lib/accessibility.ts: Removed defensive existence check to prevent false positives when testing specific elements.
  3. Refactor tests/playwright/vrt-components.spec.ts: Removed flaky waitForTimeout.
  4. Update types/global.d.ts: Cleaned up deprecated type definitions.
  5. Update playwright.config.ts: Increased global timeout to reduce CI flakiness.

PR created automatically by Jules for task 6813176962091842909 started by @arii

- 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>
@google-labs-jules
Copy link
Contributor

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@github-actions github-actions bot changed the title Refactor Bluetooth auto-connect race fix and improve test stability test(medium): Refactor Bluetooth auto-connect race fix and improve test stability Feb 26, 2026
google-labs-jules bot and others added 2 commits February 26, 2026 19:40
- 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
@arii arii closed this Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant