Commit graph

15 commits

Author SHA1 Message Date
Johannes Millan
bd488076db test(e2e): fix 2025-10-09 19:55:36 +02:00
Johannes Millan
a3a70ededf test(e2e): make less flaky 2025-09-11 13:24:05 +02:00
Johannes Millan
71082ada2d test(e2e): fix 2025-09-10 21:15:56 +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
1a82aa905b test(e2e): improve 2025-08-04 18:35:00 +02:00
Johannes Millan
55251f5e0d fix(e2e): make 'should add multiple scheduled tasks' test more reliable
- Increase timeout to 90 seconds for multiple operations
- Add page stabilization waits after critical operations
- Implement retry logic for hover interactions (3 retries)
- Add scrollIntoViewIfNeeded before hovering to ensure visibility
- Use force:true for hover to handle overlapping elements
- Clear input field before filling time values
- Add explicit waits for dialog state transitions
- Use .first() consistently to avoid multiple element issues
- Implement toPass() with retry for dynamic content verification
- Add small delays between operations to prevent race conditions

The test was flaky due to:
1. Hover interactions not always revealing buttons reliably
2. Race conditions between task creation and scheduling
3. Dialog state transitions happening too quickly
4. Multiple similar elements causing selector conflicts
2025-08-03 20:45:53 +02:00
Johannes Millan
ad38fc9185 test(e2e): handle multiple schedule button elements in reminders test
The reminders test was failing with 'strict mode violation' because after
scheduling a task, there can be multiple schedule buttons in the DOM.

Fixed by using .first() to select only the first matching element when
checking for schedule button visibility after scheduling tasks.
2025-08-03 19:51:50 +02:00
Johannes Millan
3c126c6327 test(e2e): make tests less brittle by using proper wait conditions
Refactored tests to remove arbitrary timeouts and use proper wait conditions:

plugin-iframe.spec.ts:
- Removed all waitForTimeout() calls and waitForLoadState('networkidle')
- Replaced with specific waitForSelector() and waitFor() conditions
- Used better selectors with :has() and attribute selectors
- Simplified toggle state checking with count() instead of evaluate()

reminders-schedule-page.spec.ts:
- Removed all waitForTimeout() calls
- Replaced with waitFor() on specific elements
- Better selector constants for dialog elements
- Removed unnecessary waitForLoadState() calls

These changes make tests deterministic and faster by waiting for specific
conditions rather than arbitrary time periods.
2025-08-03 19:01:40 +02:00
Johannes Millan
2b11d5eb22 test(e2e): fix and re-enable reminders-schedule-page tests
- Re-enable previously skipped tests
- Add robust waits and timeouts for CI stability
- Improve task selection using filter with hasText
- Add helper function to reduce code duplication
- Increase schedule times to 1-2 minutes for better reliability
- Fix task order verification to handle dynamic ordering
- Remove unused constants and fix linting issues

Tests now pass consistently both locally and should work in CI
2025-08-03 11:20:49 +02:00
Johannes Millan
9134bb9f4b fix(ci): correct e2e test result path and improve test stability
- Fix artifact upload path from e2e-test-results to .tmp/e2e-test-results
- Re-enable serial execution for plugin-iframe tests to avoid race conditions
- Skip flaky reminders-schedule-page tests in CI temporarily
- Update both build.yml and lint-and-test-pr.yml workflows

The CI was failing because test results were being written to .tmp/e2e-test-results
but the artifact upload was looking in e2e-test-results (without .tmp prefix)
2025-08-03 11:13:09 +02:00
Johannes Millan
c7b84336a3 test(e2e): fix test timeouts and improve stability
- Remove serial test execution from plugin-iframe tests to prevent blocking
- Add explicit timeouts to prevent indefinite hanging
- Make reminders tests independent (not relying on previous test state)
- Improve plugin enablement logic to handle already-enabled state
- Enable previously skipped tests that now work properly
- Fix selectors and improve error handling

All planner-navigation tests now pass consistently
2025-08-03 11:08:34 +02:00
Johannes Millan
123d351e75 test(e2e): skip flaky reminders-schedule-page test temporarily 2025-08-02 17:20:28 +02:00
Johannes Millan
613ccfa3da test(e2e): restore all test files from 4781b6ec with updated import paths 2025-08-02 16:57:12 +02:00
Johannes Millan
6ddbf00651 test(e2e): remove console.log statements and replace console.error with throw
- Remove all console.log statements from E2E test files
- Replace console.error with throw new Error for proper error handling
- Remove console.warn statements
- Fix unused variable linting errors in plugin tests
2025-08-02 12:25:21 +02:00
Johannes Millan
9f2c786e41 refactor: move tests 2025-08-02 11:37:25 +02:00