Commit graph

9 commits

Author SHA1 Message Date
Johannes Millan
4ba9b72597 refactor(e2e): simplify improvements per KISS/YAGNI review
Remove unused speculative abstractions:
- Delete material-helpers.ts (223 lines, zero usages)
- Delete retry-helpers.ts (186 lines, zero usages)
- Revert unused assertion helpers
- Revert unused timeout constants

Keep valuable changes:
- applyPrefix() helper in BasePage (used 4x)
- ProjectPage now uses applyPrefix() for DRY
- Simplified utils/index.ts barrel export
2026-01-06 12:46:20 +01:00
Johannes Millan
b544131921 refactor(e2e): improve 2026-01-06 12:46:20 +01:00
Johannes Millan
eca5fc930f refactor(e2e): improve test infrastructure for easier expansion
- Add all page objects to fixtures (plannerPage, syncPage, tagPage, notePage, sideNavPage)
- Create assertion helpers (expectTaskCount, expectTaskVisible, etc.)
- Enhance CLAUDE.md with patterns, import paths, and all fixtures
- Add const assertion to selectors for better TypeScript support
2026-01-03 18:39:40 +01:00
Johannes Millan
11d85208e5 refactor(e2e): replace waitForTimeout with condition-based waits
- Replace ~100 waitForTimeout calls with proper condition-based waits
- Extract shared utilities for time input and task scheduling
- Add timeout constants for consistent wait times
- Add new selectors for reminder dialogs and detail panels

Files refactored across 25+ test files including:
- Plugin tests (lifecycle, upload, loading, enable, structure)
- Reminder tests (view-task, schedule-page, default-options)
- Work view, planner, focus mode, and app feature tests
- Task dragdrop, autocomplete, and daily summary tests

New utilities created:
- e2e/utils/time-input-helper.ts - Robust time input filling
- e2e/utils/schedule-task-helper.ts - Task scheduling helpers
- e2e/constants/timeouts.ts - Standardized timeout values
2026-01-03 15:29:38 +01:00
Johannes Millan
402fb69a85 feat(e2e): streamline e2e test development with improved infrastructure
Add comprehensive improvements to make e2e test development faster and easier:

1. **New Page Objects** - Reduce code duplication and improve maintainability:
   - task.page.ts: Task operations (get, mark done, edit, subtasks, etc.)
   - settings.page.ts: Settings navigation and plugin management
   - dialog.page.ts: Dialog interactions (save, close, date editing, etc.)
   - All page objects integrated into test.fixture.ts for easy access

2. **Centralized Selectors** - Single source of truth:
   - Expanded constants/selectors.ts with 50+ selectors
   - Organized by category (Navigation, Tasks, Dialogs, Settings, etc.)
   - Makes selector updates easier when UI changes

3. **Comprehensive Documentation** - Complete e2e/README.md guide:
   - Page object usage examples
   - Common test patterns
   - Best practices and anti-patterns
   - Troubleshooting guide
   - Step-by-step instructions for writing new tests

These improvements provide a better foundation for AI-assisted test development
and make it faster to add new e2e tests.
2026-01-03 11:21:40 +01:00
Johannes Millan
ca387ca2bf refactor(e2e): improve test reliability with deterministic waits
- Add waitForStatePersistence utility for sync tests to replace hardcoded delays
- Fix nav-list vs nav-list-tree selector inconsistencies across test files
- Replace waitForTimeout calls with proper element waits and Angular stability checks
- Update selectors.ts constants to use correct nav-list-tree component selector
2025-12-11 18:47:56 +01:00
Johannes Millan
b20f845cb9 test(e2e): make all e2e tests work again and optimize 2025-09-09 23:47:34 +02:00
Johannes Millan
2cc0c02682 feat(sideNav): add new left navigation and integrate 2025-09-06 10:44:11 +02:00
Johannes Millan
9f2c786e41 refactor: move tests 2025-08-02 11:37:25 +02:00