8 Commits

Author SHA1 Message Date
Trey T
d97db4910e Rewrite all UI tests following fail-fast TEST_RULES patterns
Rewrote 60+ test files to follow honeydue-style test guidelines:
- defaultTimeout=2s, navigationTimeout=5s — fail fast, no long waits
- No coordinate taps (except onboarding paged TabView swipes)
- No sleep(), no retry loops
- No guard...else { return } silent passes — XCTFail everywhere
- All elements by accessibility ID via UITestID constants
- Screen objects for all navigation/actions/assertions
- One logical assertion per test method

Added missing accessibility identifiers to app views:
- MonthView.swift: added AccessibilityID.MonthView.grid to ScrollView
- YearView.swift: added AccessibilityID.YearView.heatmap to ScrollView

Framework rewrites:
- BaseUITestCase: added session ID, localeArguments, extraLaunchArguments
- WaitHelpers: waitForExistenceOrFail, waitUntilHittableOrFail,
  waitForNonExistence, scrollIntoView, forceTap
- All 7 screen objects rewritten with fail-fast semantics
- TEST_RULES.md added with non-negotiable rules

Known remaining issues:
- OnboardingTests: paged TabView swipes unreliable on iOS 26 simulator
- SettingsLegalLinksTests: EULA/Privacy buttons too deep in DEBUG scroll
- Customization horizontal picker scrolling needs further tuning

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 17:00:30 -05:00
Trey t
0442eab1f8 Rebrand entire project from Feels to Reflect
Complete rename across all bundle IDs, App Groups, CloudKit containers,
StoreKit product IDs, data store filenames, URL schemes, logger subsystems,
Swift identifiers, user-facing strings (7 languages), file names, directory
names, Xcode project, schemes, assets, and documentation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 11:47:16 -06:00
Trey t
315fe968d4 Fix Tests iOS build: update deployment target and remove @testable import
Tests iOS target had deployment target 15.2 (mismatched with app's 26.0)
causing linker failures. Also replaced @testable import Feels with a
local Date extension copy since UI test targets can't link the app module.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 13:36:55 -06:00
Trey t
7f27446b94 Fix 8 audit items: remove force-unwraps, improve accessibility and concurrency
- Replace force-unwrap HK types with modern HKQuantityType(_:) initializer
- Replace Calendar.date force-unwraps with guard/let in HealthService, HeaderPercView, MoodStreakActivity, DayViewViewModel, MonthTotalTemplate
- Extract DayViewViewModel.countEntries into testable static method with safe flatMap
- Replace DispatchQueue.main.asyncAfter with Task.sleep in CelebrationAnimations
- Add .minimumScaleFactor(0.5) to SmallRollUpHeaderView for Dynamic Type
- Add VoiceOver accessibility labels to HeaderPercView mood percentages
- Fix @testable import iFeel → Feels in Tests_iOS.swift
- Add 4 unit tests for countEntries (TDD)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 11:42:16 -06:00
Trey t
0e8738794b Revert "Add 57 tests covering all data mutation paths"
This reverts commit 4125c93dfe.
2026-02-14 23:32:19 -06:00
Trey t
4125c93dfe Add 57 tests covering all data mutation paths
Refactor ShowBasedOnVoteLogics to accept injectable `now: Date` parameter
across all methods, enabling deterministic testing of voting date logic
without simulator clock manipulation.

Test coverage (55 new tests across 3 files):
- Pipeline 1: Streak calculation (7 tests) — consecutive, gaps, missing/placeholder exclusion
- Pipeline 2: Duplicate prevention (5 tests) — add replaces, removeDuplicates keeps best
- Pipeline 3: Fill missing dates (4 tests) — gap fill, idempotent, no overwrite
- Pipeline 4: Delete flows (5 tests) — clearDB, deleteLast, deleteAllEntries
- Pipeline 5: Update flows (5 tests) — mood, notes, photo set/clear
- Pipeline 6: Batch import (4 tests) — bulk insert, replace, dedup in batch
- Pipeline 7: Data listeners (3 tests) — fire on save, multiple listeners, refreshFromDisk
- Pipeline 8: Boundary edge cases (5 tests) — midnight, 23:59, day boundary leak
- Pipeline 9: Voting date logic (5 tests) — Today/Previous x before/after voting time
- Pipeline 10: Side effects orchestration (7 tests) — logMood, updateMood, deleteMood
- Pipeline 11: Full integration (5 tests) — streak grows/breaks/rebuilds, voting lifecycle

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 23:25:14 -06:00
Trey t
d56e74053e hopefully fix issue where voting is filled in with missing when its time to vote 2022-03-05 11:28:29 -06:00
Trey t
edd65e891d Initial Commit 2022-01-10 08:44:49 -06:00