File tree Expand file tree Collapse file tree
AndroidSwiftUICore/Tests/AndroidSwiftUICoreTests Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66//
77
88import Testing
9+ import Foundation
910@testable import AndroidSwiftUICore
1011
1112// MARK: - Emission
@@ -261,6 +262,13 @@ struct GraphicsTests {
261262 #expect( node. children [ 0 ] . props [ " latitude " ] == . double( - 12.045 ) )
262263 }
263264
265+ @Test ( " VideoPlayer emits its media URL " )
266+ func videoPlayer( ) {
267+ let node = ViewHost ( VideoPlayer ( player: AVPlayer ( url: URL ( string: " https://example.com/clip.mp4 " ) !) ) ) . evaluate ( )
268+ #expect( node. type == " VideoPlayer " )
269+ #expect( node. props [ " url " ] == . string( " https://example.com/clip.mp4 " ) )
270+ }
271+
264272 @Test ( " Overlay emits base and overlay children with alignment " )
265273 func overlay( ) {
266274 let node = ViewHost ( Color . blue. overlay ( alignment: . bottomTrailing) { Text ( " badge " ) } ) . evaluate ( )
You can’t perform that action at this time.
0 commit comments