mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-01-31 06:42:03 +00:00
feat: enhance E2E test setup and error handling
- Updated Playwright configuration to explicitly unset ALLOWED_ROOT_DIRECTORY for unrestricted testing paths. - Improved E2E fixture setup script to reset server settings to a known state, ensuring test isolation. - Enhanced error handling in ContextView and WelcomeView components to reset state and provide user feedback on failures. - Updated tests to ensure proper navigation and visibility checks during logout processes, improving reliability.
This commit is contained in:
@@ -496,6 +496,14 @@ export function ContextView() {
|
||||
setNewMarkdownContent('');
|
||||
} catch (error) {
|
||||
logger.error('Failed to create markdown:', error);
|
||||
// Close dialog and reset state even on error to avoid stuck dialog
|
||||
setIsCreateMarkdownOpen(false);
|
||||
setNewMarkdownName('');
|
||||
setNewMarkdownDescription('');
|
||||
setNewMarkdownContent('');
|
||||
toast.error('Failed to create markdown file', {
|
||||
description: error instanceof Error ? error.message : 'Unknown error occurred',
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -319,6 +319,9 @@ export function WelcomeView() {
|
||||
projectPath: projectPath,
|
||||
});
|
||||
setShowInitDialog(true);
|
||||
|
||||
// Navigate to the board view (dialog shows as overlay)
|
||||
navigate({ to: '/board' });
|
||||
} catch (error) {
|
||||
logger.error('Failed to create project:', error);
|
||||
toast.error('Failed to create project', {
|
||||
@@ -418,6 +421,9 @@ export function WelcomeView() {
|
||||
});
|
||||
setShowInitDialog(true);
|
||||
|
||||
// Navigate to the board view (dialog shows as overlay)
|
||||
navigate({ to: '/board' });
|
||||
|
||||
// Kick off project analysis
|
||||
analyzeProject(projectPath);
|
||||
} catch (error) {
|
||||
@@ -515,6 +521,9 @@ export function WelcomeView() {
|
||||
});
|
||||
setShowInitDialog(true);
|
||||
|
||||
// Navigate to the board view (dialog shows as overlay)
|
||||
navigate({ to: '/board' });
|
||||
|
||||
// Kick off project analysis
|
||||
analyzeProject(projectPath);
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user