Add delete confirmation dialog for kanban cards

When clicking the trash icon to delete a feature card, users now see a
confirmation dialog asking them to confirm the deletion. This prevents
accidental deletions and provides a clear cancel option.

- Added Dialog component with confirm/cancel buttons to kanban-card
- Updated mock electron API to support test feature injection via __mockFeatures
- Added test utilities for delete confirmation dialog interactions
- Fixed test infrastructure to properly load mock features

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Cody Seibert
2025-12-09 08:42:11 -05:00
parent 243c84178e
commit 5e606726eb
6 changed files with 260 additions and 35 deletions

View File

@@ -150,6 +150,11 @@ export const getElectronAPI = (): ElectronAPI => {
}
// Return mock data based on file type
if (filePath.endsWith("feature_list.json")) {
// Check if test has set mock features via global variable
const testFeatures = (window as any).__mockFeatures;
if (testFeatures !== undefined) {
return { success: true, content: JSON.stringify(testFeatures, null, 2) };
}
return { success: true, content: JSON.stringify(mockFeatures, null, 2) };
}
if (filePath.endsWith("categories.json")) {
@@ -290,6 +295,10 @@ export const getElectronAPI = (): ElectronAPI => {
if (mockFileSystem[filePath] !== undefined) {
return true;
}
// Check if test has set mock features via global variable
if (filePath.endsWith("feature_list.json") && (window as any).__mockFeatures !== undefined) {
return true;
}
// Legacy mock files for backwards compatibility
if (filePath.endsWith("feature_list.json") && !filePath.includes(".automaker")) {
return true;