Refactor Playwright chat input helper to use centralized configuration for timeouts and retries
Open
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
## Overview
The Playwright chat input locator script currently relies on hardcoded magic numbers for polling intervals, visibility check attempts, and command palette timeouts. This makes test adjustments rigid when dealing with environment latency or runner differences.
## Proposed Solution
Introduce a centralized `CONFIG` object at the beginning of the script to cleanly manage all timing and retry parameters:
- `pollIntervalMs`
- `maxVisibleAttempts`
- `paletteTimeoutMs`
- `maxPaletteWaitAttempts`
## Benefits
- Improves code readability and eliminates magic numbers.
- Allows flexible tuning of test stability parameters from a single configuration block.
Contributor guide
Assessment
This issue has not been assessed yet.