4 Commits

Author SHA1 Message Date
Pedram Amini
ccea26c27b MAESTRO: add Auto Run session switching E2E tests (Task 6.4)
Add comprehensive E2E tests for session switching with Auto Run:

- Session content preservation (4 tests): Display different content,
  preserve unsaved edits warning, restore content on round-trip,
  handle rapid switching
- Session document independence (5 tests): Different document lists,
  maintain selected document, correct task counts, isolate edits,
  handle unconfigured sessions
- Session mode preservation (3 tests): Edit/preview mode per session,
  scroll position, cursor position
- Session state isolation (4 tests): Dirty state, batch run state,
  undo/redo stacks, search state
- contentVersion handling (2 tests): Respect contentVersion changes,
  prevent content loss during concurrent operations
- Edge cases (4 tests): Empty document, very long document,
  special characters, images/attachments
- Session list integration (2 tests): Highlight correct session,
  update Auto Run on click
- Full integration (4 tests): Complete A->B->A cycle, switch during
  active edit (2 skipped for multi-session infrastructure)
- Accessibility (3 tests): Focus management, keyboard navigation,
  screen reader announcements

Also added 11 new session switching helper functions to the
electron-app.ts fixture for better test maintainability.

Total: 32 tests for session switching E2E coverage.
Completes Phase 6 of the Auto Run Testing Improvement Plan.
2025-12-14 05:14:13 -06:00
Pedram Amini
aa2108b27e MAESTRO: add Auto Run batch processing E2E tests (Task 6.3)
Add comprehensive E2E tests for batch processing functionality:
- Run button behavior (5 tests)
- Batch runner modal (5 tests)
- Task completion updates (5 tests, 2 skipped)
- Stop button behavior (4 tests - skipped)
- Editing lock during batch run (4 tests - skipped)
- Mode management (3 tests - skipped)
- Image upload state (2 tests - skipped)
- Multi-document support (5 tests - skipped)
- Progress display (3 tests - skipped)
- Accessibility (3 tests)
- Error handling (3 tests - skipped)

Also add 10 batch processing helper functions to e2e/fixtures/electron-app.ts.
2025-12-14 05:09:41 -06:00
Pedram Amini
bd7274797e MAESTRO: add Auto Run editing E2E tests (Task 6.2)
Created e2e/autorun-editing.spec.ts with 34 tests covering:
- Typing in edit mode (6 tests)
- Checkbox toggling (3 tests)
- Image paste and attachment (5 tests - skipped, need mocking)
- Mode switching (5 tests)
- Save and revert (3 tests)
- Search functionality (4 tests)
- Document selector (3 tests)
- Template variables (2 tests)
- Expanded modal (3 tests)
- Accessibility (3 tests)

Also expanded e2e/fixtures/electron-app.ts with 10 new Auto Run helper functions.
2025-12-14 05:05:49 -06:00
Pedram Amini
71c2d0dafe MAESTRO: add E2E test infrastructure and Auto Run setup wizard E2E test (Task 6.1)
- Install Playwright dependencies (@playwright/test, electron-playwright-helpers)
- Create playwright.config.ts for Electron E2E testing
- Add e2e/fixtures/electron-app.ts with Electron launch fixtures and helpers
- Create e2e/autorun-setup.spec.ts with 24 tests (13 active, 11 skipped pending dialog mocking):
  - Wizard Launch: keyboard shortcut, agent selection screen, Escape to close
  - Agent Selection Screen: Claude Code display, other agents, project name, keyboard navigation
  - Directory Selection Screen: (skipped - requires dialog mocking)
  - Document Creation Flow: (skipped - requires full wizard flow)
  - Wizard Navigation: step indicators, button states, Back navigation
  - Exit Confirmation: (skipped - requires dialog mocking)
  - Accessibility: keyboard-only navigation, focus management
- Add npm scripts: test:e2e, test:e2e:ui, test:e2e:headed
- Update .gitignore with e2e-results/, playwright-report/, test-results/
2025-12-14 05:01:19 -06:00