fix: use specific data-testid selectors in project switcher assertions

Replace generic getByRole('button', { name: /.../ }) selectors with specific
getByTestId('project-switcher-project-') to avoid strict mode
violations where the selector resolves to multiple elements (project switcher
button and sidebar button).

Fixes failing E2E tests:
- feature-manual-review-flow.spec.ts
- new-project-creation.spec.ts
- open-existing-project.spec.ts
This commit is contained in:
DhanushSantosh
2026-01-17 14:53:06 +05:30
parent bac5e1c220
commit a0471098fa
3 changed files with 6 additions and 6 deletions

View File

@@ -130,8 +130,8 @@ test.describe('Feature Manual Review Flow', () => {
await page.waitForTimeout(300);
}
// Verify we're on the correct project (project name appears in sidebar button)
await expect(page.getByRole('button', { name: new RegExp(projectName) })).toBeVisible({
// Verify we're on the correct project (project switcher button shows project name)
await expect(page.getByTestId(`project-switcher-project-${projectName}`)).toBeVisible({
timeout: 10000,
});