Add submit-task flow aligned with Android and extract profile edit page.
Implement task creation with cloud/local media, order linking, and OSS upload; wire home entry and move profile nickname/avatar editing to ProfileEditViewController. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@ -44,9 +44,17 @@ final class ProfileViewModelTests: XCTestCase {
|
||||
}
|
||||
}
|
||||
|
||||
func testBeginEditingPrefillsNickname() {
|
||||
func testApplyLocalProfileUpdateSyncsNicknameAndAvatar() {
|
||||
AppStore.shared.userName = "全局昵称"
|
||||
AppStore.shared.avatar = "https://cdn.example.com/new.jpg"
|
||||
|
||||
let viewModel = ProfileViewModel()
|
||||
viewModel.beginEditing()
|
||||
XCTAssertTrue(viewModel.isEditingProfile)
|
||||
viewModel.applyLocalProfileUpdate()
|
||||
|
||||
XCTAssertEqual(viewModel.displayNickname, "全局昵称")
|
||||
XCTAssertEqual(viewModel.displayAvatarURL, "https://cdn.example.com/new.jpg")
|
||||
|
||||
AppStore.shared.userName = ""
|
||||
AppStore.shared.avatar = ""
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user