完善机巢任务实时同步并开放双构建真实操作
订阅明确无缓存时使用新发起的有效 HTTP 全量响应衔接首包,保留任务、批次和版本校验。 移除 Debug/Release 的设备指令、图传和 RTC 构建拦截,保留后端权限、身份、防重复提交及结果未知保护。 更新开发约定并补充隔离传输、飞控状态和页面回归测试。 验证:iPhone 真机 500 项相关测试通过;iOS Release 无签名编译通过。
This commit is contained in:
@@ -166,15 +166,15 @@ final class DroneDockCommandViewModelTests: XCTestCase {
|
||||
}
|
||||
}
|
||||
|
||||
/// 本地拦截明确没有发送,不将其误判为结果未知。
|
||||
func testLocalBlockIsNotAnUnknownRemoteOutcome() async throws {
|
||||
/// 后端明确拒绝不误判为结果未知,刷新和页面离开均不自动重发。
|
||||
func testBusinessRejectionIsNotAnUnknownRemoteOutcome() async throws {
|
||||
let fixture = try CommandTaskFixture()
|
||||
await fixture.model.refresh()
|
||||
fixture.write.result = .failure(DeviceCommandDebugBlockedError())
|
||||
fixture.write.result = .failure(APIError.serverCode(100050, "服务暂不可用,请稍后重试"))
|
||||
await fixture.model.sendCommand(.pause)
|
||||
fixture.model.invalidate(preservingSnapshot: true)
|
||||
XCTAssertFalse(fixture.model.commandOutcomeUnknown)
|
||||
XCTAssertEqual(fixture.model.commandErrorMessage, DeviceCommandDebugPolicy.blockedMessage)
|
||||
XCTAssertEqual(fixture.model.commandErrorMessage, "服务暂不可用,请稍后重试")
|
||||
XCTAssertNil(fixture.model.commandResponse)
|
||||
XCTAssertEqual(fixture.read.requests.count, 1)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user