Stabilize unit and UI tests for SportsTime
This commit is contained in:
@@ -249,13 +249,13 @@ final class ItinerarySemanticTravelTests: XCTestCase {
|
||||
/// For each proposedRow, simulate → compute (day, sortOrder) → constraints.isValidPosition must match.
|
||||
func test_E_computeValidDestinationRows_matchesConstraintsValidation() {
|
||||
let gameA = H.makeRichGame(city: "CityA", hour: 19, baseDate: testDate)
|
||||
let gameBDate = Calendar.current.date(byAdding: .day, value: 3, to: testDate)!
|
||||
let gameBDate = TestClock.calendar.date(byAdding: .day, value: 3, to: testDate)!
|
||||
let gameB = H.makeRichGame(city: "CityB", hour: 19, baseDate: gameBDate)
|
||||
let travel = H.makeTravelSegment(from: "CityA", to: "CityB")
|
||||
|
||||
let day2Date = Calendar.current.date(byAdding: .day, value: 1, to: testDate)!
|
||||
let day3Date = Calendar.current.date(byAdding: .day, value: 2, to: testDate)!
|
||||
let day4Date = Calendar.current.date(byAdding: .day, value: 3, to: testDate)!
|
||||
let day2Date = TestClock.calendar.date(byAdding: .day, value: 1, to: testDate)!
|
||||
let day3Date = TestClock.calendar.date(byAdding: .day, value: 2, to: testDate)!
|
||||
let day4Date = TestClock.calendar.date(byAdding: .day, value: 3, to: testDate)!
|
||||
|
||||
let items: [ItineraryRowItem] = [
|
||||
.dayHeader(dayNumber: 1, date: testDate),
|
||||
@@ -316,7 +316,7 @@ final class ItinerarySemanticTravelTests: XCTestCase {
|
||||
func test_E_customItemValidDestinations_matchesConstraints() {
|
||||
let game = H.makeRichGame(city: "Detroit", hour: 19, baseDate: testDate)
|
||||
let customItem = H.makeCustomItem(day: 1, sortOrder: 2.0, title: "Lunch")
|
||||
let day2Date = Calendar.current.date(byAdding: .day, value: 1, to: testDate)!
|
||||
let day2Date = TestClock.calendar.date(byAdding: .day, value: 1, to: testDate)!
|
||||
|
||||
let items: [ItineraryRowItem] = [
|
||||
.dayHeader(dayNumber: 1, date: testDate),
|
||||
|
||||
Reference in New Issue
Block a user