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:
webdevcody
2026-01-07 23:01:57 -05:00
parent d8cdb0bf7a
commit eb627ef323
6 changed files with 192 additions and 5 deletions

View File

@@ -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',
});
}
};

View File

@@ -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) {