feat: 接入景区空境库真实素材并统一交付入口

接通场次详情、分页、视频时长与大小,修复日期筛选越界并增加脱敏日志。统一订单与素材库交付方式弹窗,保留任务预选和上传批次,补充模拟器回归测试与接口记录。
This commit is contained in:
2026-10-30 12:11:48 +08:00
parent 20877b425c
commit 0bc801f399
29 changed files with 2350 additions and 203 deletions
@@ -0,0 +1,29 @@
import UIKit
import XCTest
@testable import suixinkan
/// 分页末行的加载与失败重试按钮不能在忙碌状态重复触发请求。
@MainActor
final class ScenicMaterialPageFooterTests: XCTestCase {
/// 禁用、重试及复用时保持一致的点击语义。
func testLoadingDisablesActionAndReuseClearsOldCallback() throws {
let cell = ScenicMaterialPageFooterCell(frame: CGRect(x: 0, y: 0, width: 320, height: 48))
let button = try XCTUnwrap(cell.contentView.subviews.compactMap { $0 as? UIButton }.first)
var requests = 0
cell.onLoadMore = { requests += 1 }
cell.configure(title: "正在加载更多场次…", enabled: false)
button.sendActions(for: .touchUpInside)
XCTAssertEqual(requests, 0)
cell.configure(title: "加载失败,点击重试", enabled: true)
button.sendActions(for: .touchUpInside)
XCTAssertEqual(requests, 1)
XCTAssertEqual(button.accessibilityIdentifier, "scenic.materials.loadMore")
cell.layoutIfNeeded()
XCTAssertGreaterThanOrEqual(button.bounds.height, 44)
cell.prepareForReuse()
button.sendActions(for: .touchUpInside)
XCTAssertEqual(requests, 1)
}
}