mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-04 09:13:08 +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',
|
currentView: 'board',
|
||||||
theme: 'dark',
|
theme: 'dark',
|
||||||
sidebarOpen: true,
|
sidebarOpen: true,
|
||||||
|
skipSandboxWarning: true,
|
||||||
apiKeys: { anthropic: '', google: '' },
|
apiKeys: { anthropic: '', google: '' },
|
||||||
chatSessions: [],
|
chatSessions: [],
|
||||||
chatHistoryOpen: false,
|
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
|
version: 0, // setup-store.ts doesn't specify a version, so zustand defaults to 0
|
||||||
};
|
};
|
||||||
localStorage.setItem('automaker-setup', JSON.stringify(setupState));
|
localStorage.setItem('automaker-setup', JSON.stringify(setupState));
|
||||||
|
|
||||||
|
// Disable splash screen in tests
|
||||||
|
sessionStorage.setItem('automaker-splash-shown', 'true');
|
||||||
}, projectPath);
|
}, projectPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -399,6 +403,7 @@ export async function setupProjectWithPathNoWorktrees(
|
|||||||
currentView: 'board',
|
currentView: 'board',
|
||||||
theme: 'dark',
|
theme: 'dark',
|
||||||
sidebarOpen: true,
|
sidebarOpen: true,
|
||||||
|
skipSandboxWarning: true,
|
||||||
apiKeys: { anthropic: '', google: '' },
|
apiKeys: { anthropic: '', google: '' },
|
||||||
chatSessions: [],
|
chatSessions: [],
|
||||||
chatHistoryOpen: false,
|
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
|
version: 0, // setup-store.ts doesn't specify a version, so zustand defaults to 0
|
||||||
};
|
};
|
||||||
localStorage.setItem('automaker-setup', JSON.stringify(setupState));
|
localStorage.setItem('automaker-setup', JSON.stringify(setupState));
|
||||||
|
|
||||||
|
// Disable splash screen in tests
|
||||||
|
sessionStorage.setItem('automaker-splash-shown', 'true');
|
||||||
}, projectPath);
|
}, projectPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -451,6 +459,7 @@ export async function setupProjectWithStaleWorktree(
|
|||||||
currentView: 'board',
|
currentView: 'board',
|
||||||
theme: 'dark',
|
theme: 'dark',
|
||||||
sidebarOpen: true,
|
sidebarOpen: true,
|
||||||
|
skipSandboxWarning: true,
|
||||||
apiKeys: { anthropic: '', google: '' },
|
apiKeys: { anthropic: '', google: '' },
|
||||||
chatSessions: [],
|
chatSessions: [],
|
||||||
chatHistoryOpen: false,
|
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
|
version: 0, // setup-store.ts doesn't specify a version, so zustand defaults to 0
|
||||||
};
|
};
|
||||||
localStorage.setItem('automaker-setup', JSON.stringify(setupState));
|
localStorage.setItem('automaker-setup', JSON.stringify(setupState));
|
||||||
|
|
||||||
|
// Disable splash screen in tests
|
||||||
|
sessionStorage.setItem('automaker-splash-shown', 'true');
|
||||||
}, projectPath);
|
}, projectPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -89,6 +89,7 @@ export async function setupProjectWithFixture(
|
|||||||
currentView: 'board',
|
currentView: 'board',
|
||||||
theme: 'dark',
|
theme: 'dark',
|
||||||
sidebarOpen: true,
|
sidebarOpen: true,
|
||||||
|
skipSandboxWarning: true,
|
||||||
apiKeys: { anthropic: '', google: '' },
|
apiKeys: { anthropic: '', google: '' },
|
||||||
chatSessions: [],
|
chatSessions: [],
|
||||||
chatHistoryOpen: false,
|
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