mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-01-31 06:42:03 +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:
@@ -469,7 +469,7 @@ export function useSettingsMigration(): MigrationState {
|
||||
// Update localStorage with fresh server data to keep cache in sync
|
||||
// This prevents stale localStorage data from being used when switching between modes
|
||||
try {
|
||||
localStorage.setItem('automaker-settings-cache', JSON.stringify(serverSettings));
|
||||
setItem('automaker-settings-cache', JSON.stringify(serverSettings));
|
||||
logger.debug('Updated localStorage with fresh server settings');
|
||||
} catch (storageError) {
|
||||
logger.warn('Failed to update localStorage cache:', storageError);
|
||||
|
||||
Reference in New Issue
Block a user