2023-10-13 19:28:41 +00:00
//
// E v e n t V i e w T e s t s . s w i f t
// d a m u s T e s t s
//
// C r e a t e d b y D a n i e l D ’ A q u i n o o n 2 0 2 3 - 1 0 - 1 3 .
//
import Foundation
import XCTest
import SnapshotTesting
import SwiftUI
@ testable import damus
final class EventViewTests : XCTestCase {
override func setUpWithError ( ) throws {
// P u t s e t u p c o d e h e r e . T h i s m e t h o d i s c a l l e d b e f o r e t h e i n v o c a t i o n o f e a c h t e s t m e t h o d i n t h e c l a s s .
}
override func tearDownWithError ( ) throws {
// P u t t e a r d o w n c o d e h e r e . T h i s m e t h o d i s c a l l e d a f t e r t h e i n v o c a t i o n o f e a c h t e s t m e t h o d i n t h e c l a s s .
}
2023-11-14 00:19:54 +00:00
/*
2023-10-13 19:28:41 +00:00
func testBasicEventViewLayout ( ) {
let test_mock_damus_state = generate_test_damus_state (
mock_profile_info : [
// M a n u a l l y m o c k s o m e p r o f i l e i n f o s o t h a t w e h a v e a m o r e r e a l i s t i c - l o o k i n g n o t e
jack_keypair . pubkey : Profile (
name : " jack " ,
display_name : " Jack Dorsey "
)
]
)
let test_note = NostrEvent (
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. " ,
keypair : jack_keypair ,
createdAt : UInt32 ( Date . init ( timeIntervalSinceNow : - 60 ) . timeIntervalSince1970 )
) !
let eventViewTest = EventView ( damus : test_mock_damus_state , event : test_note ) . padding ( )
let hostView = UIHostingController ( rootView : eventViewTest )
// R u n s n a p s h o t c h e c k
assertSnapshot ( matching : hostView , as : . image ( on : . iPhone13 ( . portrait ) ) )
}
2023-11-14 00:19:54 +00:00
*/
2023-10-13 19:28:41 +00:00
}