-
Notifications
You must be signed in to change notification settings - Fork 100
Open
Description
Problem Description
Firefox browser tests intermittently fail in the executeCommandViaMenus() method when interacting with VS Code's command palette. Elements become invisible right before click actions, causing test timeouts.
Root Cause
VS Code's command palette dynamically updates during filtering, and Firefox is more sensitive to these DOM timing variations than other browsers.
Current Error Pattern
Test timeout of 30000ms exceeded.
Error: page.click: Test timeout of 30000ms exceeded.
- element is visible, enabled and stable
- element is not visible (race condition)
Recommended Solution
Add retry logic with explicit waits to the executeCommandViaMenus() method:
async executeCommandViaMenus(command: string): Promise<void> {
await this.navigateItems(['View', 'Command Palette...'])
await this.page.fill('.quick-input-filter input', command)
// Retry click with explicit visibility checks
const maxRetries = 3
for (let i = 0; i < maxRetries; i++) {
try {
const locator = this.page.locator(`text=${command}`).first()
await locator.waitFor({ state: 'visible', timeout: 5000 })
await locator.waitFor({ state: 'stable', timeout: 1000 })
await locator.hover()
await locator.click({ timeout: 5000 })
return
} catch (error) {
if (i === maxRetries - 1) throw error
await this.page.waitForTimeout(500)
}
}
}
Files to Update
- tests/browser/tests/models/codeserver.ts (line 87)
- tests/browser/tests/codeserver.spec.ts (validation)
Acceptance Criteria
- Firefox tests pass consistently (>95% success rate)
- Cross-browser compatibility maintained
- No significant performance impact
Context
- PR: [2024b] NO-JIRA: update development dependencies in
pnpm-lock.yaml
andpackage.json
#1436 - Development dependencies update - Impact: Test reliability for codeserver workbench validation
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
📋 Backlog