damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

EventViewTests.swift (1720B)


      1 //
      2 //  EventViewTests.swift
      3 //  damusTests
      4 //
      5 //  Created by Daniel D’Aquino on 2023-10-13.
      6 //
      7 
      8 import Foundation
      9 import XCTest
     10 import SnapshotTesting
     11 import SwiftUI
     12 @testable import damus
     13 
     14 final class EventViewTests: XCTestCase {
     15     
     16     override func setUpWithError() throws {
     17         // Put setup code here. This method is called before the invocation of each test method in the class.
     18     }
     19     
     20     override func tearDownWithError() throws {
     21         // Put teardown code here. This method is called after the invocation of each test method in the class.
     22     }
     23     
     24     /*
     25     func testBasicEventViewLayout() {
     26         let test_mock_damus_state = generate_test_damus_state(
     27             mock_profile_info: [
     28                 // Manually mock some profile info so that we have a more realistic-looking note
     29                 jack_keypair.pubkey: Profile(
     30                     name: "jack",
     31                     display_name: "Jack Dorsey"
     32                 )
     33             ]
     34         )
     35         let test_note = NostrEvent(
     36             content: "Nostr is the super app. Because it’s actually an ecosystem of apps, all of which make each other better. People haven’t grasped that yet. They will when it’s more accessible and onboarding is more straightforward and intuitive.",
     37             keypair: jack_keypair,
     38             createdAt: UInt32(Date.init(timeIntervalSinceNow: -60).timeIntervalSince1970)
     39         )!
     40         
     41         let eventViewTest = EventView(damus: test_mock_damus_state, event: test_note).padding()
     42         let hostView = UIHostingController(rootView: eventViewTest)
     43         
     44         // Run snapshot check
     45         assertSnapshot(matching: hostView, as: .image(on: .iPhone13(.portrait)))
     46     }
     47      */
     48 }