diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b870e04a..9656451d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: name: macOS strategy: matrix: - xcode: ['16.3'] + xcode: ['16.4'] config: ['debug', 'release'] runs-on: macos-15 steps: @@ -32,7 +32,7 @@ jobs: name: Examples strategy: matrix: - xcode: ['16.3'] + xcode: ['16.4'] config: ['debug'] scheme: ['Reminders', 'CaseStudies', 'SyncUps'] runs-on: macos-15 diff --git a/Examples/Reminders/ReminderForm.swift b/Examples/Reminders/ReminderForm.swift index 7c73c24b..c99afc6f 100644 --- a/Examples/Reminders/ReminderForm.swift +++ b/Examples/Reminders/ReminderForm.swift @@ -135,7 +135,7 @@ struct ReminderFormView: View { selectedTags = try await database.read { db in try Tag .order(by: \.title) - .join(ReminderTag.all) { $0.id.eq($1.tagID) } + .join(ReminderTag.all) { $0.primaryKey.eq($1.tagID) } .where { $1.reminderID.eq(reminderID) } .select { tag, _ in tag } .fetchAll(db) diff --git a/Examples/Reminders/RemindersDetail.swift b/Examples/Reminders/RemindersDetail.swift index c6973168..870b5716 100644 --- a/Examples/Reminders/RemindersDetail.swift +++ b/Examples/Reminders/RemindersDetail.swift @@ -90,7 +90,7 @@ class RemindersDetailModel: HashableObject { case .flagged: reminder.isFlagged case .remindersList(let list): reminder.remindersListID.eq(list.id) case .scheduled: reminder.isScheduled - case .tags(let tags): tag.id.ifnull(UUID(0)).in(tags.map(\.id)) + case .tags(let tags): tag.primaryKey.ifnull("").in(tags.map(\.primaryKey)) case .today: reminder.isToday } } @@ -101,7 +101,7 @@ class RemindersDetailModel: HashableObject { remindersList: $3, isPastDue: $0.isPastDue, notes: $0.inlineNotes.substr(0, 200), - tags: #sql("\($2.jsonNames)") + tags: #sql("\($2.jsonTitles)") ) } return query diff --git a/Examples/Reminders/Schema.swift b/Examples/Reminders/Schema.swift index f59d733a..ab54ffff 100644 --- a/Examples/Reminders/Schema.swift +++ b/Examples/Reminders/Schema.swift @@ -36,8 +36,9 @@ extension Reminder.Draft: Identifiable {} @Table struct Tag: Hashable, Identifiable { - let id: UUID - var title = "" + @Column(primaryKey: true) + var title: String + var id: String { title } } enum Priority: Int, Codable, QueryBindable { @@ -56,7 +57,7 @@ extension Reminder { } static let withTags = group(by: \.id) .leftJoin(ReminderTag.all) { $0.id.eq($1.reminderID) } - .leftJoin(Tag.all) { $1.tagID.eq($2.id) } + .leftJoin(Tag.all) { $1.tagID.eq($2.primaryKey) } } extension Reminder.TableColumns { @@ -77,13 +78,13 @@ extension Reminder.TableColumns { } extension Tag { - static let withReminders = group(by: \.id) - .leftJoin(ReminderTag.all) { $0.id.eq($1.tagID) } + static let withReminders = group(by: \.primaryKey) + .leftJoin(ReminderTag.all) { $0.primaryKey.eq($1.tagID) } .leftJoin(Reminder.all) { $1.reminderID.eq($2.id) } } extension Tag.TableColumns { - var jsonNames: some QueryExpression<[String].JSONRepresentation> { + var jsonTitles: some QueryExpression<[String].JSONRepresentation> { self.title.jsonGroupArray(filter: self.title.isNot(nil)) } } @@ -148,10 +149,8 @@ func appDatabase() throws -> any DatabaseWriter { "notes" TEXT, "position" INTEGER NOT NULL DEFAULT 0, "priority" INTEGER, - "remindersListID" TEXT NOT NULL, - "title" TEXT NOT NULL, - - FOREIGN KEY("remindersListID") REFERENCES "remindersLists"("id") ON DELETE CASCADE + "remindersListID" TEXT NOT NULL REFERENCES "remindersLists"("id") ON DELETE CASCADE, + "title" TEXT NOT NULL ) STRICT """ ) @@ -159,8 +158,7 @@ func appDatabase() throws -> any DatabaseWriter { try #sql( """ CREATE TABLE "tags" ( - "id" TEXT PRIMARY KEY NOT NULL ON CONFLICT REPLACE DEFAULT (uuid()), - "title" TEXT NOT NULL COLLATE NOCASE + "title" TEXT COLLATE NOCASE PRIMARY KEY NOT NULL ) STRICT """ ) @@ -169,11 +167,8 @@ func appDatabase() throws -> any DatabaseWriter { """ CREATE TABLE "remindersTags" ( "id" TEXT PRIMARY KEY NOT NULL ON CONFLICT REPLACE DEFAULT (uuid()), - "reminderID" TEXT NOT NULL, - "tagID" TEXT NOT NULL, - - FOREIGN KEY("reminderID") REFERENCES "reminders"("id") ON DELETE CASCADE, - FOREIGN KEY("tagID") REFERENCES "tags"("id") ON DELETE CASCADE + "reminderID" TEXT NOT NULL REFERENCES "reminders"("id") ON DELETE CASCADE, + "tagID" TEXT NOT NULL REFERENCES "tags"("title") ON DELETE CASCADE ON UPDATE CASCADE ) STRICT """ ) @@ -220,9 +215,10 @@ private let logger = Logger(subsystem: "Reminders", category: "Database") #if DEBUG extension Database { func seedSampleData() throws { - let remindersListIDs = (0...2).map { _ in UUID() } - let reminderIDs = (0...10).map { _ in UUID() } - let tagIDs = (0...6).map { _ in UUID() } + @Dependency(\.date.now) var now + @Dependency(\.uuid) var uuid + let remindersListIDs = (0...2).map { _ in uuid() } + let reminderIDs = (0...10).map { _ in uuid() } try seed { RemindersList( id: remindersListIDs[0], @@ -247,14 +243,14 @@ private let logger = Logger(subsystem: "Reminders", category: "Database") ) Reminder( id: reminderIDs[1], - dueDate: Date().addingTimeInterval(-60 * 60 * 24 * 2), + dueDate: now.addingTimeInterval(-60 * 60 * 24 * 2), isFlagged: true, remindersListID: remindersListIDs[0], title: "Haircut" ) Reminder( id: reminderIDs[2], - dueDate: Date(), + dueDate: now, notes: "Ask about diet", priority: .high, remindersListID: remindersListIDs[0], @@ -262,20 +258,20 @@ private let logger = Logger(subsystem: "Reminders", category: "Database") ) Reminder( id: reminderIDs[3], - dueDate: Date().addingTimeInterval(-60 * 60 * 24 * 190), + dueDate: now.addingTimeInterval(-60 * 60 * 24 * 190), isCompleted: true, remindersListID: remindersListIDs[0], title: "Take a walk" ) Reminder( id: reminderIDs[4], - dueDate: Date(), + dueDate: now, remindersListID: remindersListIDs[0], title: "Buy concert tickets" ) Reminder( id: reminderIDs[5], - dueDate: Date().addingTimeInterval(60 * 60 * 24 * 2), + dueDate: now.addingTimeInterval(60 * 60 * 24 * 2), isFlagged: true, priority: .high, remindersListID: remindersListIDs[1], @@ -283,7 +279,7 @@ private let logger = Logger(subsystem: "Reminders", category: "Database") ) Reminder( id: reminderIDs[6], - dueDate: Date().addingTimeInterval(-60 * 60 * 24 * 2), + dueDate: now.addingTimeInterval(-60 * 60 * 24 * 2), isCompleted: true, priority: .low, remindersListID: remindersListIDs[1], @@ -291,7 +287,7 @@ private let logger = Logger(subsystem: "Reminders", category: "Database") ) Reminder( id: reminderIDs[7], - dueDate: Date().addingTimeInterval(60 * 60 * 24 * 4), + dueDate: now.addingTimeInterval(60 * 60 * 24 * 4), isCompleted: false, priority: .high, remindersListID: remindersListIDs[1], @@ -299,7 +295,7 @@ private let logger = Logger(subsystem: "Reminders", category: "Database") ) Reminder( id: reminderIDs[8], - dueDate: Date().addingTimeInterval(60 * 60 * 24 * 2), + dueDate: now.addingTimeInterval(60 * 60 * 24 * 2), notes: """ Status of tax return Expenses for next year @@ -310,7 +306,7 @@ private let logger = Logger(subsystem: "Reminders", category: "Database") ) Reminder( id: reminderIDs[9], - dueDate: Date().addingTimeInterval(-60 * 60 * 24 * 2), + dueDate: now.addingTimeInterval(-60 * 60 * 24 * 2), isCompleted: true, priority: .medium, remindersListID: remindersListIDs[2], @@ -318,18 +314,15 @@ private let logger = Logger(subsystem: "Reminders", category: "Database") ) Reminder( id: reminderIDs[10], - dueDate: Date().addingTimeInterval(60 * 60 * 24 * 2), + dueDate: now.addingTimeInterval(60 * 60 * 24 * 2), isCompleted: false, remindersListID: remindersListIDs[2], title: "Prepare for WWDC" ) - Tag(id: tagIDs[0], title: "car") - Tag(id: tagIDs[1], title: "kids") - Tag(id: tagIDs[2], title: "someday") - Tag(id: tagIDs[3], title: "optional") - Tag(id: tagIDs[4], title: "social") - Tag(id: tagIDs[5], title: "night") - Tag(id: tagIDs[6], title: "adulting") + let tagIDs = ["car", "kids", "someday", "optional", "social", "night", "adulting"] + for tagID in tagIDs { + Tag(title: tagID) + } ReminderTag.Draft(reminderID: reminderIDs[0], tagID: tagIDs[2]) ReminderTag.Draft(reminderID: reminderIDs[0], tagID: tagIDs[3]) ReminderTag.Draft(reminderID: reminderIDs[0], tagID: tagIDs[6]) diff --git a/Examples/Reminders/SearchReminders.swift b/Examples/Reminders/SearchReminders.swift index 0cc0ed5a..1c73ba6b 100644 --- a/Examples/Reminders/SearchReminders.swift +++ b/Examples/Reminders/SearchReminders.swift @@ -67,7 +67,7 @@ class SearchRemindersModel { notes: $0.inlineNotes, reminder: $0, remindersList: $3, - tags: #sql("\($2.jsonNames)") + tags: #sql("\($2.jsonTitles)") ) }, animation: .default diff --git a/Examples/Reminders/TagRow.swift b/Examples/Reminders/TagRow.swift index ffe38591..42b126f5 100644 --- a/Examples/Reminders/TagRow.swift +++ b/Examples/Reminders/TagRow.swift @@ -34,7 +34,7 @@ struct TagRow: View { #Preview { NavigationStack { List { - TagRow(tag: Tag(id: UUID(1), title: "optional")) + TagRow(tag: Tag(title: "optional")) } } } diff --git a/Examples/Reminders/TagsForm.swift b/Examples/Reminders/TagsForm.swift index 0c576c16..ca5c9284 100644 --- a/Examples/Reminders/TagsForm.swift +++ b/Examples/Reminders/TagsForm.swift @@ -56,7 +56,7 @@ struct TagsView: View { let rest = try Tag - .where { !$0.id.in(top.map(\.id)) } + .where { !$0.primaryKey.in(top.map(\.primaryKey)) } .order(by: \.title) .fetchAll(db) diff --git a/Examples/RemindersTests/Internal.swift b/Examples/RemindersTests/Internal.swift index 82a02504..a0ea19c6 100644 --- a/Examples/RemindersTests/Internal.swift +++ b/Examples/RemindersTests/Internal.swift @@ -1,3 +1,4 @@ +import CustomDump import Foundation import SharingGRDB import SwiftUI @@ -6,153 +7,28 @@ import Testing @testable import Reminders @Suite( + .dependency(\.date.now, Date(timeIntervalSince1970: 1234567890)), + .dependency(\.uuid, .incrementing), .dependencies { - $0.date.now = baseDate $0.defaultDatabase = try Reminders.appDatabase() - try $0.defaultDatabase.write { try $0.seedTestData() } + try $0.defaultDatabase.write { try $0.seedSampleData() } }, .snapshots(record: .failed) ) struct BaseTestSuite {} -extension Database { - func seedTestData() throws { - let baseDate = baseDate - try seed { - RemindersList( - id: UUID(0), - color: Color(red: 0x4a / 255, green: 0x99 / 255, blue: 0xef / 255), - position: 0, - title: "Personal" - ) - RemindersList( - id: UUID(1), - color: Color(red: 0xed / 255, green: 0x89 / 255, blue: 0x35 / 255), - position: 1, - title: "Family" - ) - RemindersList( - id: UUID(2), - color: Color(red: 0xb2 / 255, green: 0x5d / 255, blue: 0xd3 / 255), - position: 2, - title: "Business" - ) - Reminder( - id: UUID(0), - notes: "Milk\nEggs\nApples\nOatmeal\nSpinach", - position: 0, - remindersListID: UUID(0), - title: "Groceries" - ) - Reminder( - id: UUID(1), - dueDate: baseDate.addingTimeInterval(-60 * 60 * 24 * 2), - isFlagged: true, - position: 1, - remindersListID: UUID(0), - title: "Haircut" - ) - Reminder( - id: UUID(2), - dueDate: baseDate, - notes: "Ask about diet", - position: 2, - priority: .high, - remindersListID: UUID(0), - title: "Doctor appointment" - ) - Reminder( - id: UUID(3), - dueDate: baseDate.addingTimeInterval(-60 * 60 * 24 * 190), - isCompleted: true, - position: 3, - remindersListID: UUID(0), - title: "Take a walk" - ) - Reminder( - id: UUID(4), - dueDate: baseDate, - position: 4, - remindersListID: UUID(0), - title: "Buy concert tickets" - ) - Reminder( - id: UUID(5), - dueDate: baseDate.addingTimeInterval(60 * 60 * 24 * 2), - isFlagged: true, - position: 5, - priority: .high, - remindersListID: UUID(1), - title: "Pick up kids from school" - ) - Reminder( - id: UUID(6), - dueDate: baseDate.addingTimeInterval(-60 * 60 * 24 * 2), - isCompleted: true, - position: 6, - priority: .low, - remindersListID: UUID(1), - title: "Get laundry" - ) - Reminder( - id: UUID(7), - dueDate: baseDate.addingTimeInterval(60 * 60 * 24 * 4), - isCompleted: false, - position: 7, - priority: .high, - remindersListID: UUID(1), - title: "Take out trash" - ) - Reminder( - id: UUID(8), - dueDate: baseDate.addingTimeInterval(60 * 60 * 24 * 2), - notes: """ - Status of tax return - Expenses for next year - Changing payroll company - """, - position: 8, - remindersListID: UUID(2), - title: "Call accountant" - ) - Reminder( - id: UUID(9), - dueDate: baseDate.addingTimeInterval(-60 * 60 * 24 * 2), - isCompleted: true, - position: 9, - priority: .medium, - remindersListID: UUID(2), - title: "Send weekly emails" - ) - Reminder( - id: UUID(10), - dueDate: baseDate.addingTimeInterval(60 * 60 * 24 * 2), - isCompleted: false, - position: 10, - remindersListID: UUID(2), - title: "Prepare for WWDC" - ) - Tag(id: UUID(0), title: "car") - Tag(id: UUID(1), title: "kids") - Tag(id: UUID(2), title: "someday") - Tag(id: UUID(3), title: "optional") - Tag(id: UUID(4), title: "social") - Tag(id: UUID(5), title: "night") - Tag(id: UUID(6), title: "adulting") - ReminderTag.Draft(reminderID: UUID(0), tagID: UUID(2)) - ReminderTag.Draft(reminderID: UUID(0), tagID: UUID(3)) - ReminderTag.Draft(reminderID: UUID(0), tagID: UUID(6)) - ReminderTag.Draft(reminderID: UUID(1), tagID: UUID(2)) - ReminderTag.Draft(reminderID: UUID(1), tagID: UUID(3)) - ReminderTag.Draft(reminderID: UUID(2), tagID: UUID(6)) - ReminderTag.Draft(reminderID: UUID(3), tagID: UUID(0)) - ReminderTag.Draft(reminderID: UUID(3), tagID: UUID(1)) - ReminderTag.Draft(reminderID: UUID(4), tagID: UUID(4)) - ReminderTag.Draft(reminderID: UUID(3), tagID: UUID(4)) - ReminderTag.Draft(reminderID: UUID(10), tagID: UUID(4)) - ReminderTag.Draft(reminderID: UUID(4), tagID: UUID(5)) - } +// NB: SwiftUI colors are not consistently dumped across simulators. +extension RemindersList: @retroactive CustomDumpReflectable { + public var customDumpMirror: Mirror { + Mirror( + self, + children: [ + "id": id, + "color": Color.HexRepresentation(queryOutput: color).hexValue ?? 0, + "position": position, + "title": title + ], + displayStyle: .struct + ) } } - -private let baseDate = Date(timeIntervalSince1970: 1234567890) diff --git a/Examples/RemindersTests/RemindersDetailsTests.swift b/Examples/RemindersTests/RemindersDetailsTests.swift index 89529d88..b51c7aa8 100644 --- a/Examples/RemindersTests/RemindersDetailsTests.swift +++ b/Examples/RemindersTests/RemindersDetailsTests.swift @@ -20,7 +20,7 @@ extension BaseTestSuite { [ [0]: RemindersDetailModel.Row( reminder: Reminder( - id: UUID(00000000-0000-0000-0000-000000000001), + id: UUID(00000000-0000-0000-0000-000000000004), dueDate: Date(2009-02-11T23:31:30.000Z), isCompleted: false, isFlagged: true, @@ -32,31 +32,20 @@ extension BaseTestSuite { ), remindersList: RemindersList( id: UUID(00000000-0000-0000-0000-000000000000), - color: Color( - provider: ColorBox( - base: ResolvedColorProvider( - color: Color.Resolved( - linearRed: 0.06662594, - linearGreen: 0.31854683, - linearBlue: 0.8631573, - opacity: 1.0 - ) - ) - ) - ), + color: 1218047999, position: 1, title: "Personal" ), isPastDue: true, notes: "", tags: [ - [0]: "someday", - [1]: "optional" + [0]: "optional", + [1]: "someday" ] ), [1]: RemindersDetailModel.Row( reminder: Reminder( - id: UUID(00000000-0000-0000-0000-000000000002), + id: UUID(00000000-0000-0000-0000-000000000005), dueDate: Date(2009-02-13T23:31:30.000Z), isCompleted: false, isFlagged: false, @@ -68,18 +57,7 @@ extension BaseTestSuite { ), remindersList: RemindersList( id: UUID(00000000-0000-0000-0000-000000000000), - color: Color( - provider: #1 ColorBox( - base: ResolvedColorProvider( - color: Color.Resolved( - linearRed: 0.06662594, - linearGreen: 0.31854683, - linearBlue: 0.8631573, - opacity: 1.0 - ) - ) - ) - ), + color: 1218047999, position: 1, title: "Personal" ), @@ -91,7 +69,7 @@ extension BaseTestSuite { ), [2]: RemindersDetailModel.Row( reminder: Reminder( - id: UUID(00000000-0000-0000-0000-000000000004), + id: UUID(00000000-0000-0000-0000-000000000007), dueDate: Date(2009-02-13T23:31:30.000Z), isCompleted: false, isFlagged: false, @@ -103,31 +81,20 @@ extension BaseTestSuite { ), remindersList: RemindersList( id: UUID(00000000-0000-0000-0000-000000000000), - color: Color( - provider: #2 ColorBox( - base: ResolvedColorProvider( - color: Color.Resolved( - linearRed: 0.06662594, - linearGreen: 0.31854683, - linearBlue: 0.8631573, - opacity: 1.0 - ) - ) - ) - ), + color: 1218047999, position: 1, title: "Personal" ), isPastDue: false, notes: "", tags: [ - [0]: "social", - [1]: "night" + [0]: "night", + [1]: "social" ] ), [3]: RemindersDetailModel.Row( reminder: Reminder( - id: UUID(00000000-0000-0000-0000-000000000000), + id: UUID(00000000-0000-0000-0000-000000000003), dueDate: nil, isCompleted: false, isFlagged: false, @@ -145,27 +112,16 @@ extension BaseTestSuite { ), remindersList: RemindersList( id: UUID(00000000-0000-0000-0000-000000000000), - color: Color( - provider: #3 ColorBox( - base: ResolvedColorProvider( - color: Color.Resolved( - linearRed: 0.06662594, - linearGreen: 0.31854683, - linearBlue: 0.8631573, - opacity: 1.0 - ) - ) - ) - ), + color: 1218047999, position: 1, title: "Personal" ), isPastDue: false, notes: "Milk Eggs Apples Oatmeal Spinach", tags: [ - [0]: "someday", + [0]: "adulting", [1]: "optional", - [2]: "adulting" + [2]: "someday" ] ) ] @@ -375,15 +331,14 @@ extension BaseTestSuite { } @Test func tagged() async throws { - let tag = try await database.read { try Tag.all.fetchOne($0)! } + let tag = try await database.read { try Tag.find("someday").fetchOne($0)! } let model = RemindersDetailModel(detailType: .tags([tag])) try await model.$reminderRows.load() assertInlineSnapshot(of: model.reminderRows.map(\.reminder.title), as: .customDump) { """ [ - [0]: "Pick up kids from school", - [1]: "Call accountant", - [2]: "Take out trash" + [0]: "Haircut", + [1]: "Groceries" ] """ } diff --git a/Examples/RemindersTests/RemindersListsTests.swift b/Examples/RemindersTests/RemindersListsTests.swift index 86dc485e..45c3560d 100644 --- a/Examples/RemindersTests/RemindersListsTests.swift +++ b/Examples/RemindersTests/RemindersListsTests.swift @@ -21,18 +21,7 @@ extension BaseTestSuite { remindersCount: 4, remindersList: RemindersList( id: UUID(00000000-0000-0000-0000-000000000000), - color: Color( - provider: ColorBox( - base: ResolvedColorProvider( - color: Color.Resolved( - linearRed: 0.06662594, - linearGreen: 0.31854683, - linearBlue: 0.8631573, - opacity: 1.0 - ) - ) - ) - ), + color: 1218047999, position: 1, title: "Personal" ) @@ -41,18 +30,7 @@ extension BaseTestSuite { remindersCount: 2, remindersList: RemindersList( id: UUID(00000000-0000-0000-0000-000000000001), - color: Color( - provider: #1 ColorBox( - base: ResolvedColorProvider( - color: Color.Resolved( - linearRed: 0.8468733, - linearGreen: 0.25015837, - linearBlue: 0.0343398, - opacity: 1.0 - ) - ) - ) - ), + color: 3985191935, position: 2, title: "Family" ) @@ -61,18 +39,7 @@ extension BaseTestSuite { remindersCount: 2, remindersList: RemindersList( id: UUID(00000000-0000-0000-0000-000000000002), - color: Color( - provider: #2 ColorBox( - base: ResolvedColorProvider( - color: Color.Resolved( - linearRed: 0.44520125, - linearGreen: 0.10946172, - linearBlue: 0.6514057, - opacity: 1.0 - ) - ) - ) - ), + color: 2992493567, position: 3, title: "Business" ) @@ -93,34 +60,13 @@ extension BaseTestSuite { assertInlineSnapshot(of: model.tags, as: .customDump) { """ [ - [0]: Tag( - id: UUID(00000000-0000-0000-0000-000000000006), - title: "adulting" - ), - [1]: Tag( - id: UUID(00000000-0000-0000-0000-000000000000), - title: "car" - ), - [2]: Tag( - id: UUID(00000000-0000-0000-0000-000000000001), - title: "kids" - ), - [3]: Tag( - id: UUID(00000000-0000-0000-0000-000000000005), - title: "night" - ), - [4]: Tag( - id: UUID(00000000-0000-0000-0000-000000000003), - title: "optional" - ), - [5]: Tag( - id: UUID(00000000-0000-0000-0000-000000000004), - title: "social" - ), - [6]: Tag( - id: UUID(00000000-0000-0000-0000-000000000002), - title: "someday" - ) + [0]: Tag(title: "adulting"), + [1]: Tag(title: "car"), + [2]: Tag(title: "kids"), + [3]: Tag(title: "night"), + [4]: Tag(title: "optional"), + [5]: Tag(title: "social"), + [6]: Tag(title: "someday") ] """ } diff --git a/Examples/RemindersTests/SearchRemindersTests.swift b/Examples/RemindersTests/SearchRemindersTests.swift index de0c53c5..66d8b7e7 100644 --- a/Examples/RemindersTests/SearchRemindersTests.swift +++ b/Examples/RemindersTests/SearchRemindersTests.swift @@ -35,7 +35,7 @@ extension BaseTestSuite { isPastDue: false, notes: "", reminder: Reminder( - id: UUID(00000000-0000-0000-0000-000000000007), + id: UUID(00000000-0000-0000-0000-00000000000A), dueDate: Date(2009-02-17T23:31:30.000Z), isCompleted: false, isFlagged: false, @@ -47,18 +47,7 @@ extension BaseTestSuite { ), remindersList: RemindersList( id: UUID(00000000-0000-0000-0000-000000000001), - color: Color( - provider: ColorBox( - base: ResolvedColorProvider( - color: Color.Resolved( - linearRed: 0.8468733, - linearGreen: 0.25015837, - linearBlue: 0.0343398, - opacity: 1.0 - ) - ) - ) - ), + color: 3985191935, position: 2, title: "Family" ), @@ -84,7 +73,7 @@ extension BaseTestSuite { isPastDue: false, notes: "", reminder: Reminder( - id: UUID(00000000-0000-0000-0000-000000000007), + id: UUID(00000000-0000-0000-0000-00000000000A), dueDate: Date(2009-02-17T23:31:30.000Z), isCompleted: false, isFlagged: false, @@ -96,18 +85,7 @@ extension BaseTestSuite { ), remindersList: RemindersList( id: UUID(00000000-0000-0000-0000-000000000001), - color: Color( - provider: ColorBox( - base: ResolvedColorProvider( - color: Color.Resolved( - linearRed: 0.8468733, - linearGreen: 0.25015837, - linearBlue: 0.0343398, - opacity: 1.0 - ) - ) - ) - ), + color: 3985191935, position: 2, title: "Family" ), @@ -117,7 +95,7 @@ extension BaseTestSuite { isPastDue: false, notes: "", reminder: Reminder( - id: UUID(00000000-0000-0000-0000-000000000003), + id: UUID(00000000-0000-0000-0000-000000000006), dueDate: Date(2008-08-07T23:31:30.000Z), isCompleted: true, isFlagged: false, @@ -129,18 +107,7 @@ extension BaseTestSuite { ), remindersList: RemindersList( id: UUID(00000000-0000-0000-0000-000000000000), - color: Color( - provider: #1 ColorBox( - base: ResolvedColorProvider( - color: Color.Resolved( - linearRed: 0.06662594, - linearGreen: 0.31854683, - linearBlue: 0.8631573, - opacity: 1.0 - ) - ) - ) - ), + color: 1218047999, position: 1, title: "Personal" ), @@ -171,7 +138,7 @@ extension BaseTestSuite { isPastDue: false, notes: "", reminder: Reminder( - id: UUID(00000000-0000-0000-0000-000000000007), + id: UUID(00000000-0000-0000-0000-00000000000A), dueDate: Date(2009-02-17T23:31:30.000Z), isCompleted: false, isFlagged: false, @@ -183,18 +150,7 @@ extension BaseTestSuite { ), remindersList: RemindersList( id: UUID(00000000-0000-0000-0000-000000000001), - color: Color( - provider: ColorBox( - base: ResolvedColorProvider( - color: Color.Resolved( - linearRed: 0.8468733, - linearGreen: 0.25015837, - linearBlue: 0.0343398, - opacity: 1.0 - ) - ) - ) - ), + color: 3985191935, position: 2, title: "Family" ),