新增门店订单与核销管理列表,对齐 Android 订单能力并完善账号级缓存。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-29 14:46:10 +08:00
parent c4de3d17d0
commit 08492df6ce
51 changed files with 3668 additions and 102 deletions

View File

@ -171,6 +171,35 @@ final class ProfileSecondaryPagesTests: XCTestCase {
XCTAssertFalse(RealNameAuthViewModel.isValidMainlandIDCardNumber("123"))
}
/// 使
func testProfileDisplayFieldsUseCachedProfileBeforeUserInfoLoads() {
let viewModel = ProfileViewModel()
viewModel.applyCachedProfile(
AccountProfile(
userId: "101",
displayName: "缓存昵称",
phone: "13800000000",
avatarURL: "https://cdn.example.com/avatar.jpg"
)
)
XCTAssertEqual(viewModel.displayNickname, "缓存昵称")
XCTAssertEqual(viewModel.displayPhone, "13800000000")
XCTAssertEqual(viewModel.displayAvatarURL, "https://cdn.example.com/avatar.jpg")
}
///
func testApplyCachedProfileIgnoredAfterUserInfoLoaded() {
let viewModel = ProfileViewModel()
viewModel.userInfo = UserInfoResponse(nickname: "接口昵称", phone: "13900000000")
viewModel.applyCachedProfile(
AccountProfile(userId: "101", displayName: "缓存昵称", phone: "13800000000")
)
XCTAssertEqual(viewModel.displayNickname, "接口昵称")
XCTAssertEqual(viewModel.displayPhone, "13900000000")
}
/// OSS URL
func testProfileAvatarUploadUpdatesAvatarURL() async throws {
let session = ProfileSecondaryURLSession(responses: [