Commit graph

22 commits

Author SHA1 Message Date
Johannes Millan
f7a26fd332 test(e2e): increase webServer startup timeout to 2 minutes
The CI timeout of 90s was too short for the production build to complete,
causing false test failures.
2026-03-18 13:14:10 +01:00
Johannes Millan
755cd705f5
Fix/run 22683814946 (#6740)
test(e2e): fix e2e tests
2026-03-05 19:37:48 +01:00
Johannes Millan
7c746fb48d fix(e2e): disable reuseExistingServer to prevent stale server issues
With reuseExistingServer: true, Playwright silently reuses whatever
is on port 4242 without health checks. A stale ng serve that no
longer serves assets causes all tests to fail with cryptic 404s.
Setting false makes Playwright fail fast with a clear error message.
2026-03-03 20:31:37 +01:00
Johannes Millan
e5708236de fix(e2e): eliminate plugin 404 errors in CI
Root cause: ng serve doesn't reliably detect plugin assets copied to
src/assets/bundled-plugins/ during E2E setup, causing 404s in CI.

Solution: Implement dual-mode E2E testing:
- CI: Build Angular app first (includes plugins), serve with http-server
- Local: Continue using ng serve for fast iteration

Changes:
- Add buildFrontend:e2e script (builds plugins THEN Angular)
- Add serveFrontend:e2e:prod script (http-server with SPA proxy)
- CI workflows now build frontend before running E2E tests
- Global setup skips duplicate plugin builds (saves ~30s)
- Playwright config uses environment-specific server commands
- Added build output verification step

Benefits:
- 100% reliable plugin asset availability in CI
- Faster CI startup (90s vs 180s timeout)
- Better debugging (removed --silent flag)
- Local development unchanged
2026-01-23 21:28:41 +01:00
Johannes Millan
f67bd288bf fix(e2e): configure downloads path to prevent leaking to ~/Downloads
Adds explicit downloadsPath to Playwright config so test downloads
go to .tmp/e2e-test-results/downloads/ instead of the system Downloads
folder.
2026-01-15 12:02:22 +01:00
Johannes Millan
3f3f0685eb Merge branch 'master' into feat/operation-logs
* master: (21 commits)
  test: increase timeout for encryption
  16.8.3
  fix(e2e): use pressSequentially for time input in task-detail tests
  fix(sync): resolve 25-second initial sync timeout race condition
  feat(e2e): add Docker-based E2E test isolation
  fix(schedule): start tracking selected task when pressing Y in schedule view
  fix(tasks): clear reminder when clicking "today" button on already-today tasks
  fix(e2e): use format-agnostic time change in task-detail tests
  16.8.2
  fix(test): reset selector overrides to prevent test pollution
  build: update CLAUDE.md
  fix(calendar): add periodic refresh for planner and scheduler views
  feat(effects): consolidate task update actions in PluginHooksEffects
  fix(sync): show skip button immediately when offline
  fix(db): add missing _afterReady guard to loadAll method
  feat(android): add alarm sound and vibration to task reminders
  feat(sync): add skip button to loading screen when waiting for sync
  fix(pomodoro): allow manual session end to start break early
  fix(i18n): add missing translate pipe to play button tooltip
  fix(tasks): handle undefined tasks in reminder effect
  ...

# Conflicts:
#	CLAUDE.md
#	docker-compose.e2e.yaml
#	e2e/tests/task-detail/task-detail.spec.ts
#	package.json
#	src/app/features/tasks/store/task-reminder.effects.spec.ts
#	src/app/features/tasks/store/task-reminder.effects.ts
#	src/app/plugins/plugin-hooks.effects.ts
2026-01-04 18:20:10 +01:00
Johannes Millan
40d7118e17 feat(e2e): add Docker-based E2E test isolation
Add Docker setup for running E2E tests with the Angular dev server
containerized while Playwright runs on the host. Supports multiple
instances via configurable ports.

New files:
- Dockerfile.e2e.dev: Dev server image
- docker-compose.e2e.yaml: E2E orchestration config
- scripts/wait-for-app.sh: Health check script

New npm scripts:
- e2e:docker: Run E2E with containerized app
- e2e:docker:webdav: Same but includes WebDAV for sync tests

Usage: APP_PORT=4343 npm run e2e:docker
2026-01-04 17:09:39 +01:00
Johannes Millan
85fa50974b Merge branch 'master' into feat/operation-logs
* master:
  refactor(e2e): improve test infrastructure for easier expansion
  chore(e2e): remove broken/empty skipped tests
  test(e2e): fix flaky plugin and WebDAV sync tests
  refactor(e2e): replace waitForTimeout with condition-based waits
  perf(e2e): remove ineffective waits to speed up test runs
  docs(e2e): add CLAUDE.md reference and barrel export for easier test creation
  build: update dep
  refactor(e2e): simplify waits and fix flaky tests
  feat(e2e): streamline e2e test development with improved infrastructure
  perf(e2e): optimize wait utilities and addTask method for faster test execution
  16.8.1

# Conflicts:
#	e2e/pages/base.page.ts
#	e2e/pages/project.page.ts
#	e2e/tests/reminders/reminders-schedule-page.spec.ts
#	e2e/tests/sync/webdav-sync-advanced.spec.ts
#	e2e/tests/sync/webdav-sync-expansion.spec.ts
#	e2e/tests/sync/webdav-sync-full.spec.ts
#	e2e/utils/waits.ts
2026-01-03 18:51:51 +01:00
Johannes Millan
e3f9daf9fa refactor(e2e): simplify waits and fix flaky tests
- Remove Angular testability API checks from waitForAngularStability
  Experiment showed Playwright's auto-waiting is sufficient for most tests
- Fix time-tracking-feature test: add missing await, replace hardcoded
  waitForTimeout with proper toHaveClass assertions
- Refactor plugin-simple-enable test to use SettingsPage methods
  instead of brittle page.evaluate() DOM manipulation (106 -> 33 lines)
- Change trace config to 'retain-on-failure' for better debugging
2026-01-03 12:57:16 +01:00
Johannes Millan
8d32419eef build: more tests in parallel 2025-12-28 15:07:11 +01:00
Johannes Millan
e268076332 test(e2e): try to fix e2e tests 2025-12-10 21:26:48 +01:00
Johannes Millan
ecdd06988a test(e2e): improve e2e stability 2025-11-06 19:54:50 +01:00
Johannes Millan
8c12a70601 test(e2e): make more reliable 2025-09-11 18:13:31 +02:00
Johannes Millan
b20f845cb9 test(e2e): make all e2e tests work again and optimize 2025-09-09 23:47:34 +02:00
Johannes Millan
526741e201 build: run in parallel 2025-08-03 21:03:08 +02:00
Johannes Millan
902decf1e8 build(ci): install Playwright browsers before running e2e tests
- Add 'npx playwright install --with-deps chromium' step to CI workflows
- Remove unnecessary Chrome setup action (replaced by Playwright)
- This fixes "Executable doesn't exist" error when launching browser

The CI was failing because Playwright browsers weren't installed.
The server now starts successfully in ~60 seconds.
2025-08-03 13:23:17 +02:00
Johannes Millan
bb42630de9 tmp increase timeout 2025-08-03 13:01:04 +02:00
Johannes Millan
983c9fda70 build(ci): use npm script to start e2e test server
- Change from 'ng serve' to 'npm run startFrontend:e2e'
- This ensures proper environment setup via tools/load-env.js
- Fixes server not starting in CI environment
- Keep timeout at 60s since server should start properly now

The CI was failing because 'ng serve' wasn't accessible directly.
Using the npm script ensures proper PATH resolution and environment setup.
2025-08-03 12:36:09 +02:00
Johannes Millan
aece8540be build(ci): resolve e2e webserver timeout issues
- Increase webserver timeout from 30s to 5 minutes for CI
- Show server output in CI for better debugging
- Don't reuse existing server in CI to ensure clean state
- Limit parallel workers to prevent resource contention
- Add .gitignore for temporary test files

The CI was failing with "Timed out waiting 30000ms from config.webServer"
because the Angular dev server takes longer to start in CI environments
2025-08-03 12:36:02 +02:00
Johannes Millan
6577b82392 build: run more tests in parallel 2025-08-02 17:25:44 +02:00
Johannes Millan
fed010b6d3 test(e2e): revert plugin tests to 4781b6ec state with fixed import paths 2025-08-02 16:50:18 +02:00
Johannes Millan
9f2c786e41 refactor: move tests 2025-08-02 11:37:25 +02:00
Renamed from e2e-playwright/playwright.config.ts (Browse further)