Skip to content

Commit e43ac97

Browse files
committed
Test VideoPlayer emission
1 parent ca2d9df commit e43ac97

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

AndroidSwiftUICore/Tests/AndroidSwiftUICoreTests/EvaluatorTests.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77

88
import 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()

0 commit comments

Comments
 (0)