fix(ui): address PR review comments and fix E2E tests for unified sidebar

- Add try/catch for getElectronAPI() in sidebar-footer with window.open fallback
- Use formatShortcut() for OS-aware hotkey display in sidebar-header
- Remove unnecessary optional chaining on project.icon
- Remove redundant ternary in sidebar-navigation className
- Update E2E tests to use new project-dropdown-trigger data-testid

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Stefan de Vogelaere
2026-01-23 01:58:15 +01:00
parent d09da4af20
commit a4214276d7
6 changed files with 28 additions and 27 deletions

View File

@@ -18,7 +18,6 @@ import {
authenticateForTests,
handleLoginScreenIfPresent,
waitForNetworkIdle,
sanitizeForTestId,
} from '../utils';
// Create unique temp dir for this test run
@@ -169,11 +168,11 @@ test.describe('Open Project', () => {
}
// Wait for a project to be set as current and visible on the page
// The project name appears in the project switcher button
// Use ends-with selector since data-testid format is: project-switcher-{id}-{sanitizedName}
// The project name appears in the project dropdown trigger
if (targetProjectName) {
const sanitizedName = sanitizeForTestId(targetProjectName);
await expect(page.locator(`[data-testid$="-${sanitizedName}"]`)).toBeVisible({
await expect(
page.locator('[data-testid="project-dropdown-trigger"]').getByText(targetProjectName)
).toBeVisible({
timeout: 15000,
});
}