From 763f9832c36c2d4426d262e87735cfdafee731f7 Mon Sep 17 00:00:00 2001 From: webdevcody Date: Wed, 7 Jan 2026 16:31:48 -0500 Subject: [PATCH] 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. --- apps/ui/tests/utils/git/worktree.ts | 12 ++++++++++++ apps/ui/tests/utils/project/fixtures.ts | 1 + .../test-project-1767820775187/package.json | 4 ++++ test/fixtures/test-image.png | Bin 0 -> 69 bytes 4 files changed, 17 insertions(+) create mode 100644 test/feature-backlog-test-80497-5rxs746/test-project-1767820775187/package.json create mode 100644 test/fixtures/test-image.png diff --git a/apps/ui/tests/utils/git/worktree.ts b/apps/ui/tests/utils/git/worktree.ts index 72e281d4..0a80fce1 100644 --- a/apps/ui/tests/utils/git/worktree.ts +++ b/apps/ui/tests/utils/git/worktree.ts @@ -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); } diff --git a/apps/ui/tests/utils/project/fixtures.ts b/apps/ui/tests/utils/project/fixtures.ts index a02a9163..f39d4817 100644 --- a/apps/ui/tests/utils/project/fixtures.ts +++ b/apps/ui/tests/utils/project/fixtures.ts @@ -89,6 +89,7 @@ export async function setupProjectWithFixture( currentView: 'board', theme: 'dark', sidebarOpen: true, + skipSandboxWarning: true, apiKeys: { anthropic: '', google: '' }, chatSessions: [], chatHistoryOpen: false, diff --git a/test/feature-backlog-test-80497-5rxs746/test-project-1767820775187/package.json b/test/feature-backlog-test-80497-5rxs746/test-project-1767820775187/package.json new file mode 100644 index 00000000..95455cee --- /dev/null +++ b/test/feature-backlog-test-80497-5rxs746/test-project-1767820775187/package.json @@ -0,0 +1,4 @@ +{ + "name": "test-project-1767820775187", + "version": "1.0.0" +} diff --git a/test/fixtures/test-image.png b/test/fixtures/test-image.png new file mode 100644 index 0000000000000000000000000000000000000000..3b29c7b0b69ee21ef25db19b7836155d8c3577ce GIT binary patch literal 69 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx1SBVv2j2ryJf1F&Asp9}f1E!6lwo9Kkht5s Q1t`wo>FVdQ&MBb@0Jr)NL;wH) literal 0 HcmV?d00001