feat: enhance test setup with splash screen handling and sandbox warnings

- Added `skipSandboxWarning` option to project setup functions to streamline testing.
- Implemented logic to disable the splash screen during tests by setting `automaker-splash-shown` in sessionStorage.
- Introduced a new package.json for a test project and added a test image to the fixtures for improved testing capabilities.
This commit is contained in:
webdevcody
2026-01-07 16:31:48 -05:00
parent 11b1bbc143
commit 763f9832c3
4 changed files with 17 additions and 0 deletions

View File

@@ -346,6 +346,7 @@ export async function setupProjectWithPath(page: Page, projectPath: string): Pro
currentView: 'board',
theme: 'dark',
sidebarOpen: true,
skipSandboxWarning: true,
apiKeys: { anthropic: '', google: '' },
chatSessions: [],
chatHistoryOpen: false,
@@ -373,6 +374,9 @@ export async function setupProjectWithPath(page: Page, projectPath: string): Pro
version: 0, // setup-store.ts doesn't specify a version, so zustand defaults to 0
};
localStorage.setItem('automaker-setup', JSON.stringify(setupState));
// Disable splash screen in tests
sessionStorage.setItem('automaker-splash-shown', 'true');
}, projectPath);
}
@@ -399,6 +403,7 @@ export async function setupProjectWithPathNoWorktrees(
currentView: 'board',
theme: 'dark',
sidebarOpen: true,
skipSandboxWarning: true,
apiKeys: { anthropic: '', google: '' },
chatSessions: [],
chatHistoryOpen: false,
@@ -424,6 +429,9 @@ export async function setupProjectWithPathNoWorktrees(
version: 0, // setup-store.ts doesn't specify a version, so zustand defaults to 0
};
localStorage.setItem('automaker-setup', JSON.stringify(setupState));
// Disable splash screen in tests
sessionStorage.setItem('automaker-splash-shown', 'true');
}, projectPath);
}
@@ -451,6 +459,7 @@ export async function setupProjectWithStaleWorktree(
currentView: 'board',
theme: 'dark',
sidebarOpen: true,
skipSandboxWarning: true,
apiKeys: { anthropic: '', google: '' },
chatSessions: [],
chatHistoryOpen: false,
@@ -479,6 +488,9 @@ export async function setupProjectWithStaleWorktree(
version: 0, // setup-store.ts doesn't specify a version, so zustand defaults to 0
};
localStorage.setItem('automaker-setup', JSON.stringify(setupState));
// Disable splash screen in tests
sessionStorage.setItem('automaker-splash-shown', 'true');
}, projectPath);
}