fix: 允许已确认订单再次交付成片
This commit is contained in:
@@ -58,9 +58,9 @@ final class DroneDockDeliveryViewModelTests: XCTestCase {
|
||||
XCTAssertFalse(fixture.model.canSubmit)
|
||||
}
|
||||
|
||||
/// 未读取、无上传权限、已完成订单及不支持的视频不发送写请求。
|
||||
/// 无上传权限、已取消、已退款和不支持的视频均不发送写请求。
|
||||
func testPermissionAndVideoValidationDisableSubmission() async throws {
|
||||
for (allowed, status) in [(false, 20), (true, 30)] {
|
||||
for (allowed, status) in [(false, 20), (true, 10), (true, 40), (true, 50)] {
|
||||
let fixture = try DeliveryVMFixture(initialTaskID: 11)
|
||||
fixture.service.detailValue = try DeliveryVMData.detail(allowed: allowed, status: status)
|
||||
await fixture.prepare()
|
||||
@@ -135,11 +135,11 @@ final class DroneDockDeliveryViewModelTests: XCTestCase {
|
||||
XCTAssertNotNil(fixture.model.submissionErrorMessage)
|
||||
}
|
||||
|
||||
/// 上传期间订单完成时不再调用成片保存接口,已上传地址留作核对而非交付成功。
|
||||
func testCompletionDuringUploadStopsSave() async throws {
|
||||
/// 上传期间订单取消时不再调用成片保存接口,已上传地址留作核对。
|
||||
func testCancellationDuringUploadStopsSave() async throws {
|
||||
let fixture = try DeliveryVMFixture(initialTaskID: 11)
|
||||
await fixture.prepare()
|
||||
fixture.uploader.onUpload = { fixture.service.detailValue = try! DeliveryVMData.detail(allowed: false, status: 30) }
|
||||
fixture.uploader.onUpload = { fixture.service.detailValue = try! DeliveryVMData.detail(allowed: false, status: 40) }
|
||||
await fixture.model.submit()
|
||||
XCTAssertEqual(fixture.uploader.calls, 1)
|
||||
XCTAssertTrue(fixture.service.saves.isEmpty)
|
||||
|
||||
Reference in New Issue
Block a user