mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-01 20:23:36 +00:00
fix: use setItem helper and safer Playwright selector in tests
- Replace direct localStorage.setItem() with setItem helper in use-settings-migration.ts (line 472) for consistent storage-availability checks and error handling - Replace brittle attribute selector with Playwright's getByRole in open-existing-project.spec.ts (line 162) to handle names containing special characters Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -159,7 +159,7 @@ test.describe('Open Project', () => {
|
||||
// The project name appears in the project switcher button with title attribute
|
||||
// (The button uses data-testid with projectId, not projectName)
|
||||
if (targetProjectName) {
|
||||
const projectSwitcherButton = page.locator(`button[title="${targetProjectName}"]`).first();
|
||||
const projectSwitcherButton = page.getByRole('button', { name: targetProjectName }).first();
|
||||
await expect(projectSwitcherButton).toBeVisible({
|
||||
timeout: 15000,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user