feat: adopt a two-pane start screen
This commit is contained in:
@@ -63,6 +63,19 @@ struct PlaybackProgressChecks {
|
||||
let migratedAgain = PlaybackProgress(defaults: isolated)
|
||||
require(migratedAgain.position(for: file) == 43 && migratedAgain.position(for: youtube) == 15,
|
||||
"opening another player preserves both migrated bookmarks and newer progress")
|
||||
progress.recordRecent(file, title: "Original")
|
||||
progress.recordRecent(youtube, title: "YouTube title")
|
||||
independent.recordRecent(alias, title: "Renamed")
|
||||
require(reopened.recentMedia == [
|
||||
.init(url: file.resolvingSymlinksInPath(), title: "Renamed"), .init(url: youtube, title: "YouTube title")
|
||||
], "recent media persists titles, shares file identities, and moves reopened items to the front")
|
||||
for index in 0..<6 {
|
||||
progress.recordRecent(directory.appendingPathComponent("\(index).mp4"), title: "Video \(index)")
|
||||
}
|
||||
require(reopened.recentMedia.map(\.title) == (0..<6).reversed().map { "Video \($0)" },
|
||||
"recent media retains only the six most recently opened items in order")
|
||||
require(PlaybackProgress(defaults: isolated).recentMedia.isEmpty,
|
||||
"recent media respects the injected preference domain")
|
||||
print("Playback progress checks passed")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user