mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-01-30 06:12:03 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -89,6 +89,7 @@ export async function setupProjectWithFixture(
|
||||
currentView: 'board',
|
||||
theme: 'dark',
|
||||
sidebarOpen: true,
|
||||
skipSandboxWarning: true,
|
||||
apiKeys: { anthropic: '', google: '' },
|
||||
chatSessions: [],
|
||||
chatHistoryOpen: false,
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"name": "test-project-1767820775187",
|
||||
"version": "1.0.0"
|
||||
}
|
||||
BIN
test/fixtures/test-image.png
vendored
Normal file
BIN
test/fixtures/test-image.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 69 B |
Reference in New Issue
Block a user