fix(ios): align tests with current PomodoroConfig/PomodoroState/CreateCountdownParams signatures

- PomodoroConfig: add longBreakMinutes parameter
- PomodoroState: add isLongBreak, completedRounds parameters; remove roundStartedAt
- CreateCountdownParams: duration → durationSeconds
- RescheduleEngineTests: compare timeIntervalSince1970 (not Date) with accuracy
This commit is contained in:
saravanakumardb1 2026-03-21 08:34:50 -07:00
parent d3c3affc1b
commit 995cdb8e7d
2 changed files with 4 additions and 4 deletions

View File

@ -187,7 +187,7 @@ final class RescheduleEngineTests: XCTestCase {
for warning in shifted.warnings {
let expected = newTarget.addingTimeInterval(-Double(warning.minutesBefore) * 60)
XCTAssertEqual(warning.scheduledTime, expected, accuracy: 1)
XCTAssertEqual(warning.scheduledTime.timeIntervalSince1970, expected.timeIntervalSince1970, accuracy: 1)
}
}

View File

@ -31,8 +31,8 @@ final class SharedTimerDataTests: XCTestCase {
urgency: .important
))
timer.warnings = [warning, warning2]
timer.pomodoroConfig = PomodoroConfig(workMinutes: 25, breakMinutes: 5, rounds: 4)
timer.pomodoroState = PomodoroState(currentRound: 2, isBreak: false, roundStartedAt: now)
timer.pomodoroConfig = PomodoroConfig(workMinutes: 25, breakMinutes: 5, longBreakMinutes: 15, rounds: 4)
timer.pomodoroState = PomodoroState(currentRound: 2, isBreak: false, isLongBreak: false, completedRounds: 1)
let snapshot = timer.toSnapshot()
@ -55,7 +55,7 @@ final class SharedTimerDataTests: XCTestCase {
let target = now.addingTimeInterval(600)
let timer = createCountdown(CreateCountdownParams(
label: "Quick",
duration: 600,
durationSeconds: 600,
urgency: .gentle
))