import Foundation import UIKit import XCTest @testable import OldFella enum SecureSessionTimelineFixture { static func post(_ id: String, viewer: [String: Any] = [:]) -> [String: Any] { [ "uri": id, "cid": "cid", "author": ["did": "did:plc:author", "handle": "author.example", "viewer": viewer], "record": ["text": id], "indexedAt": "2024-05-06T12:34:56.123Z" ] } static var blocked: [String: Any] { [ "$type": "app.bsky.feed.defs#blockedPost", "uri": "at://did:plc:blocked/app.bsky.feed.post/blocked", "blocked": true, "author": ["did": "did:plc:blocked"] ] } static var body: [String: Any] { [ "feed": [ [ "post": post("timeline-repost"), "reason": [ "$type": "app.bsky.feed.defs#reasonRepost", "indexedAt": "2024-05-06T12:34:56.123Z", "by": ["did": "did:plc:reader", "handle": "reader.bsky.social"] ] ], ["post": post("timeline-quote")], ["post": post("muted-post", viewer: ["muted": true])], [ "post": post( "list-muted-post", viewer: [ "mutedByList": [ "uri": "at://did:plc:reader/app.bsky.graph.list/muted", "cid": "bafk-list", "name": "Muted accounts", "purpose": "app.bsky.graph.defs#modlist" ] ]) ], ["post": post("not-muted-post", viewer: ["muted": false])], [ "post": post("muted-repost"), "reply": ["root": post("root"), "parent": post("parent")], "reason": [ "$type": "app.bsky.feed.defs#reasonRepost", "indexedAt": "2024-05-06T12:34:56.123Z", "by": ["did": "did:plc:muted", "handle": "muted.example", "viewer": ["muted": true]] ] ], ["post": post("direct-blocked", viewer: ["blocking": "at://block"])], ["post": post("direct-blocked-by", viewer: ["blockedBy": true])], [ "post": post( "direct-list-blocked", viewer: [ "blockingByList": [ "uri": "at://did:plc:reader/app.bsky.graph.list/blocked", "cid": "bafk-list", "name": "Blocked accounts", "purpose": "app.bsky.graph.defs#modlist" ] ]) ], ["post": post("root-blocked"), "reply": ["root": blocked, "parent": post("parent")]], ["post": post("parent-blocked"), "reply": ["root": post("root"), "parent": blocked]], [ "post": post("root-viewer-blocked"), "reply": [ "root": post("root", viewer: ["blocking": "at://block"]), "parent": post("parent") ] ], [ "post": post("parent-viewer-blocked"), "reply": [ "root": post("root"), "parent": ["post": post("parent", viewer: ["blockedBy": true])] ] ], ["post": post("visible-reply"), "reply": ["root": post("root"), "parent": post("parent")]], [ "post": post("unavailable-parent"), "reply": [ "root": post("root"), "parent": [ "$type": "app.bsky.feed.defs#notFoundPost", "uri": "at://did:plc:author/app.bsky.feed.post/missing", "notFound": true ] ] ] ], "cursor": "next-page" ] } }