Skip to content

Cover scrolling, interaction, SwiftUI modifiers and the EventKit bridge - #151

Merged
mmick66 merged 4 commits into
mainfrom
test-coverage
Sep 30, 2026
Merged

mmick66 merged 4 commits into
mainfrom
test-coverage

Conversation

@mmick66

@mmick66 mmick66 commented Sep 30, 2026

Copy link
Copy Markdown
Owner

Raises test coverage of the core from 87% to 98% and of the EventKit target from 0% to 73% (the remainder is the EKEventStore adapter itself). 90 tests in six suites.

Fixed (found by the new tests)

  • loadEvents() queried up to the start of the last day of the range, so events later on that day were missed.
  • The header did not mirror when a calendar was right-to-left on its own rather than through the app's layout direction.
  • A CalendarView decoded from an archive crashed in the header's init(coder:). The view, header and cells now decode and rebuild themselves; setup is idempotent.

Added

  • CalendarEventStore, the part of EKEventStore the bridge uses, with EventsManager.store as the injection point for a test double. Additive; no existing API changes.

Tests

  • EventKitTests drive the bridge with a fake store: access requested once, denial and request failures, adding with and without access, loadEvents over the full range, the completion form on the main actor, addEvent durations.
  • ScrollingTests: animated scrolls report when they settle, rapid next-month taps end on the last target without snapping back, drags cancel a pending animation, stale animation callbacks are ignored, vertical paging, switching direction keeps the month, long press, right-to-left mirroring, appearance changes, decoding from an archive. UIKit does not run scroll animations in a test process, so the tests deliver the scroll view callbacks themselves.
  • PlatformTests: every SwiftUI modifier, and a range picked in the view reaching the binding.

Also

  • CI builds the EventKit documentation; DocC cross-module links it could not resolve are now code spans.
  • CI and the podspec screenshot URL point at main after the rename from master.
  • Podspec and changelog record 2.0.1. Note that the 2.0.1 tag points at the current main, whose podspec still says 2.0.0; the fixes above are under "Unreleased" and can ship as 2.0.2.
  • Adds .claude/settings.json (git/gh permission rules for Claude Code).

🤖 Generated with Claude Code

Michael Michailidis and others added 4 commits September 8, 2026 13:37
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ubk2MsmduPdDLM7FZXFU8C
Coverage of the core goes from 87% to 98%; the EventKit target from 0%
to 73%, where the remainder is the EKEventStore adapter itself.

- CalendarEventStore, the part of EKEventStore the bridge uses, with
  EventsManager.store as the injection point. EventKitTests drive the
  bridge with a fake store: access requested once, denial and request
  failures, add with and without access, loadEvents over the full range,
  the completion form on the main actor, addEvent durations.
- ScrollingTests: animated scrolls report when they settle, rapid next
  month taps end on the last target without snapping back, drags cancel
  a pending animation, stale animation callbacks are ignored, vertical
  paging offsets and layout attributes, switching direction keeps the
  month, long press with and without events, right-to-left mirroring,
  appearance changes re-resolve cell borders, and a view decoded from an
  archive works. UIKit does not run scroll animations in a test process,
  so the tests deliver the scroll view callbacks themselves.
- The SwiftUI test covers every modifier and a range picked in the view
  reaching the binding.

Three defects found by the new tests, fixed:

- loadEvents() queried up to the start of the last day, so events later
  on that day were missed.
- The header did not mirror when a calendar was right-to-left on its own
  rather than through the app's direction.
- A CalendarView decoded from an archive crashed in the header's
  init(coder:). The view, header and cells now decode and rebuild
  themselves; setup is idempotent.

Also: EventKit docbuild in CI, cross-module doc links that DocC could
not resolve replaced by code spans. 90 tests in six suites.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ubk2MsmduPdDLM7FZXFU8C
The default branch was renamed from master to main.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@mmick66
mmick66 merged commit 08874ae into main Sep 30, 2026
2 checks passed
@mmick66
mmick66 deleted the test-coverage branch September 30, 2026 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant