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:
parent
d3c3affc1b
commit
995cdb8e7d
@ -187,7 +187,7 @@ final class RescheduleEngineTests: XCTestCase {
|
|||||||
|
|
||||||
for warning in shifted.warnings {
|
for warning in shifted.warnings {
|
||||||
let expected = newTarget.addingTimeInterval(-Double(warning.minutesBefore) * 60)
|
let expected = newTarget.addingTimeInterval(-Double(warning.minutesBefore) * 60)
|
||||||
XCTAssertEqual(warning.scheduledTime, expected, accuracy: 1)
|
XCTAssertEqual(warning.scheduledTime.timeIntervalSince1970, expected.timeIntervalSince1970, accuracy: 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -31,8 +31,8 @@ final class SharedTimerDataTests: XCTestCase {
|
|||||||
urgency: .important
|
urgency: .important
|
||||||
))
|
))
|
||||||
timer.warnings = [warning, warning2]
|
timer.warnings = [warning, warning2]
|
||||||
timer.pomodoroConfig = PomodoroConfig(workMinutes: 25, breakMinutes: 5, rounds: 4)
|
timer.pomodoroConfig = PomodoroConfig(workMinutes: 25, breakMinutes: 5, longBreakMinutes: 15, rounds: 4)
|
||||||
timer.pomodoroState = PomodoroState(currentRound: 2, isBreak: false, roundStartedAt: now)
|
timer.pomodoroState = PomodoroState(currentRound: 2, isBreak: false, isLongBreak: false, completedRounds: 1)
|
||||||
|
|
||||||
let snapshot = timer.toSnapshot()
|
let snapshot = timer.toSnapshot()
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ final class SharedTimerDataTests: XCTestCase {
|
|||||||
let target = now.addingTimeInterval(600)
|
let target = now.addingTimeInterval(600)
|
||||||
let timer = createCountdown(CreateCountdownParams(
|
let timer = createCountdown(CreateCountdownParams(
|
||||||
label: "Quick",
|
label: "Quick",
|
||||||
duration: 600,
|
durationSeconds: 600,
|
||||||
urgency: .gentle
|
urgency: .gentle
|
||||||
))
|
))
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user