Fix regia basket e stabilità diretta iOS.
La regia remota non va più in 500 su basket/timed; iOS gestisce chiusura set, riconnessione RTMP e avanzamento quarti in modo affidabile. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
25
native/ios/MatchLiveTvTests/LiveScoreDialogHostTests.swift
Normal file
25
native/ios/MatchLiveTvTests/LiveScoreDialogHostTests.swift
Normal file
@@ -0,0 +1,25 @@
|
||||
import XCTest
|
||||
@testable import MatchLiveTv
|
||||
|
||||
@MainActor
|
||||
final class LiveScoreDialogHostTests: XCTestCase {
|
||||
func testResolveTrueCompletesShow() async {
|
||||
let host = LiveScoreDialogHost()
|
||||
let task = Task { await host.show(ScoreDialogState(kind: .setWon)) }
|
||||
try? await Task.sleep(nanoseconds: 50_000_000)
|
||||
host.resolve(true)
|
||||
let result = await task.value
|
||||
XCTAssertTrue(result)
|
||||
XCTAssertNil(host.pending)
|
||||
}
|
||||
|
||||
func testSecondResolveIsIgnored() async {
|
||||
let host = LiveScoreDialogHost()
|
||||
let task = Task { await host.show(ScoreDialogState(kind: .setWon)) }
|
||||
try? await Task.sleep(nanoseconds: 50_000_000)
|
||||
host.resolve(true)
|
||||
host.resolve(false)
|
||||
let result = await task.value
|
||||
XCTAssertTrue(result)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user