1.1.0 feature work: Monthly Check-in, Charts, Goals, Share, Reviews

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
alexandrev-tibco
2026-02-11 23:37:11 +01:00
parent daaca95913
commit 4761e2e5c8
19 changed files with 1118 additions and 90 deletions
@@ -0,0 +1,36 @@
import XCTest
@testable import PortfolioJournal
final class MonthlyCheckInViewTests: XCTestCase {
func testMonthLabelUsesMonthAndYear() {
var components = DateComponents()
components.year = 2026
components.month = 2
components.day = 1
let date = Calendar(identifier: .gregorian).date(from: components)!
let label = MonthlyCheckInView.monthLabel(
for: date,
relativeTo: date,
locale: Locale(identifier: "en_US_POSIX")
)
XCTAssertEqual(label, "February 2026")
}
func testMonthLabelUsesPreviousMonthDuringGracePeriod() {
var components = DateComponents()
components.year = 2026
components.month = 2
components.day = 20
let date = Calendar(identifier: .gregorian).date(from: components)!
let label = MonthlyCheckInView.monthLabel(
for: date,
relativeTo: date,
locale: Locale(identifier: "en_US_POSIX")
)
XCTAssertEqual(label, "January 2026")
}
}