Resolve conflict in webdav-sync-expansion.spec.ts:
- Use simplified sync verification without reload (sync updates NgRx directly)
- Test: B marks task done -> sync -> verify A sees task as done
This commit introduces a suite of new end-to-end integration tests for SuperSync, covering various scenarios to ensure robustness and correctness.
Key additions include:
- : Tests scenarios where a client works locally before enabling sync, focusing on correct merging of data.
- : Verifies synchronization of non-task models such as projects, tags, and project notes.
- Integration tests for :
- : Tests large batch uploads and downloads with pagination.
- : Verifies handling of schema version mismatches during sync.
- : Ensures robustness against total and partial network failures during sync, including recovery and retry mechanisms.
- : Focuses on core service logic, including encryption/decryption and conflict dialog integration.
- : Modified to improve handling of accepted operations and updates during sync.
- and : Minor adjustments for stability and improved interaction in e2e tests.
These tests significantly enhance the coverage and reliability of SuperSync functionality.
- Navigate to project after creation (createProject doesn't auto-navigate)
- Expand Projects group and wait for project to appear before navigating
- Wait for URL to change to /project/ route after clicking project
- Use more specific page-title selector to avoid matching old view titles
- Increase timeout for title assertion
- 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
Implemented navigateToProjectByName in ProjectPage to resolve 'TypeError: navigateToProjectByName is not a function' in webdav-sync-expansion.spec.ts. This method now includes robust logic for expanding the 'Projects' group and multiple fallback strategies for locating project buttons.
Added 1-second delays before triggerSync() calls in webdav-sync-expansion.spec.ts (after marking a task undone) and webdav-sync-full.spec.ts (after task deletion). This mitigates race conditions, allowing local state changes to persist before synchronization, thus reducing test flakiness.
All WebDAV E2E tests are now passing consistently.
- Update WebDAV base URL to use 127.0.0.1 instead of localhost in E2E sync tests. This resolves ECONNREFUSED errors in CI environments where localhost might resolve to IPv6 (::1) while the WebDAV server binds to IPv4.
- Increase various UI interaction timeouts in ProjectPage to improve stability and prevent flakiness in CI environments.