feat: 完善机巢任务实时状态、双路图传与继续查看入口
This commit is contained in:
@@ -209,8 +209,8 @@ final class DroneDockTaskPresentationTests: XCTestCase {
|
||||
XCTAssertEqual(model.presentation.deviceStatus, "—")
|
||||
}
|
||||
|
||||
/// 刷新中保留上一阶段及动作文案,主动作禁用至本次读取成功。
|
||||
func testLoadingPreservesPreviousCompletedPresentationWithDisabledAction() async throws {
|
||||
/// 已有可信完成态时,无感刷新保留素材入口可点,不因只读请求短暂锁住按钮。
|
||||
func testLoadingPreservesPreviousCompletedPresentationWithEnabledAction() async throws {
|
||||
let service = PresentationPendingService(response: try DroneDockShootingTaskTestData.decode(["task": ["status": 30]]))
|
||||
let model = try makeModel(service: service)
|
||||
await model.refresh()
|
||||
@@ -221,7 +221,7 @@ final class DroneDockTaskPresentationTests: XCTestCase {
|
||||
XCTAssertEqual(model.presentation.phase, .completed)
|
||||
XCTAssertEqual(model.presentation.action, .materials)
|
||||
XCTAssertEqual(model.presentation.actionTitle, "查看素材")
|
||||
XCTAssertFalse(model.presentation.isActionEnabled)
|
||||
XCTAssertTrue(model.presentation.isActionEnabled)
|
||||
service.finish()
|
||||
await pending.value
|
||||
XCTAssertEqual(model.presentation.phase, .completed)
|
||||
|
||||
Reference in New Issue
Block a user