feat: 完善机巢任务安全控制与状态诊断
同步新版飞控与 WebSocket 回执合同,完善独立指令等待、暂停继续和返航状态;增加真机诊断并优化倒计时与素材库展示。
This commit is contained in:
@@ -18,6 +18,7 @@ final class DroneDockResummonLiveViewTests: XCTestCase {
|
||||
let fixedIDs = ["top", "stateContainer", "safety"]
|
||||
let frames = try fixedIDs.map { try XCTUnwrap(find(controller.view, suffix: $0)).frame }
|
||||
let oldTitle = model.presentation.title
|
||||
let oldBatch = try XCTUnwrap(model.response?.executionBatch)
|
||||
let oldBattery = find(controller.view, suffix: "metric.battery")?.accessibilityValue
|
||||
let button = try XCTUnwrap(find(controller.view, suffix: "failureRetry") as? UIButton)
|
||||
capture(window, name: "重新召唤-失败任务-本地模拟")
|
||||
@@ -28,8 +29,10 @@ final class DroneDockResummonLiveViewTests: XCTestCase {
|
||||
XCTAssertEqual(model.presentation.title, oldTitle)
|
||||
XCTAssertEqual(find(controller.view, suffix: "metric.battery")?.accessibilityValue, oldBattery)
|
||||
try await settle(window) {
|
||||
model.hasSubmittedResummon && !model.isResummoning && model.presentation.phase == .ready
|
||||
(model.response?.executionBatch ?? 0) > oldBatch
|
||||
&& !model.isResummoning && model.presentation.phase == .ready
|
||||
}
|
||||
XCTAssertFalse(model.hasSubmittedResummon, "新的执行批次应清除上一批次的重召唤锁")
|
||||
XCTAssertFalse(model.canResummon)
|
||||
XCTAssertTrue(model.canStartShooting)
|
||||
for (suffix, frame) in zip(fixedIDs, frames) {
|
||||
@@ -149,7 +152,8 @@ final class DroneDockResummonLiveViewTests: XCTestCase {
|
||||
XCTAssertEqual(controller.liveViewModel.state, .unavailable("暂未提供图传播放参数"))
|
||||
XCTAssertNil(controller.liveViewModel.playbackURL)
|
||||
XCTAssertEqual((find(controller.view, suffix: "live.status") as? UILabel)?.text, "暂未提供图传播放参数")
|
||||
XCTAssertTrue(try XCTUnwrap(find(controller.view, suffix: "live.source")).isHidden)
|
||||
XCTAssertTrue(try XCTUnwrap(find(controller.view, suffix: "live.badge")).isHidden,
|
||||
"实时标识整体隐藏后,内部文案标签不需要单独隐藏")
|
||||
let feed = try XCTUnwrap(find(controller.view, suffix: "feedPlaceholder"))
|
||||
XCTAssertNil(feed.layer.sublayers?.compactMap { $0 as? AVPlayerLayer }.first?.player)
|
||||
capture(window, name: "图传-缺少播放参数")
|
||||
|
||||
Reference in New Issue
Block a user