aboutsummaryrefslogtreecommitdiff
path: root/tests/test-integration-recurring-events.el
Commit message (Collapse)AuthorAgeFilesLines
* fix(test): stop silently skipping every integration testCraig Jennings29 hours1-32/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | INTEGRATION_TESTS globbed test-integration-%.el through $(wildcard ...), which takes a shell glob where % is a literal character, not a pattern. It expanded to nothing, so test-all skipped the integration phase and still printed "All tests complete". Fourteen files never ran, for as long as the variable has existed. The % is right one line up, because filter-out does take make patterns. The glob is now test-integration-*.el, and the counts add up: 597 unit + 14 integration = the 611 test files on disk. Turning the gate on surfaced five failures, none of them in production code. Four were rotting fixtures. parse-ics drops events outside a rolling window of today minus calendar-sync-past-months to plus future-months, and four tests fed it dates pinned to November 2025 or February 2026. They passed when written and began failing once the window slid past them. Their neighbours survived for two reasons: some hand their fixture to parse-event, which applies no window, and the weekly ones use unbounded RRULEs that keep generating into the window however old the DTSTART is. The fixtures now build dates relative to now, which is what the timezone file's own helper already did. The fifth was a real regression, caught five months late. The recording toggle test asserted on a fixture device and got whatever hardware is plugged into the developer's machine. cj/recording-get-devices runs --validate-system-audio, which shells to pactl, finds the fixture device isn't a real source, and auto-fixes the configured device to the default sink's monitor. The test mocked start-process-shell-command but not shell-command-to-string, so validation reached the real machine. It passes at 5bdd3420~1 and fails at 5bdd3420, the commit that added that validation in February. I faked pactl at the shell boundary rather than stubbing --validate-system-audio out, so the validation logic still runs, against a fixture machine.
* fix(tests): correct flaky test assertionsCraig Jennings2026-02-031-2/+2
| | | | | | | - calendar-sync: fix GTFO count bounds to match 15-month window (was incorrectly assuming 12-month/52-week window) - video-recording: add process-status mock to prevent race condition where process hadn't exited yet when sentinel was manually called
* feat(calendar-sync): multi-calendar support with property testsCraig Jennings2025-12-021-1/+1
| | | | | | Added multi-URL calendar sync supporting Google and Proton calendars. Each calendar syncs to separate file with per-calendar state tracking. Added 13 property-based tests for RRULE expansion. Total: 150 tests passing.
* feat(calendar-sync): Add RRULE support and refactor expansion functionsCraig Jennings2025-11-181-0/+347
Implements complete recurring event (RRULE) expansion for Google Calendar with rolling window approach and comprehensive test coverage. Features: - RRULE expansion for DAILY, WEEKLY, MONTHLY, YEARLY frequencies - Support for INTERVAL, BYDAY, UNTIL, and COUNT parameters - Rolling window: -3 months to +12 months from current date - Fixed COUNT parameter bug (events no longer appear beyond their limit) - Fixed TZID parameter parsing (supports timezone-specific timestamps) - Replaced debug messages with cj/log-silently Refactoring: - Extracted helper functions to eliminate code duplication: - calendar-sync--date-to-time: Date to time conversion - calendar-sync--before-date-p: Date comparison - calendar-sync--create-occurrence: Event occurrence creation - Refactored all expansion functions to use helper functions - Reduced code duplication across daily/weekly/monthly/yearly expansion Testing: - 68 tests total across 5 test files - Unit tests for RRULE parsing, property extraction, weekly expansion - Integration tests for complete RRULE workflow - Tests for helper functions validating refactored code - All tests passing