Add scenic selection and cooperation order flows aligned with Android.
Upgrade scenic picker with search, location sorting, permission apply/status, and blocking home dialog; add cooperation order module and order source picker improvements with unit tests. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@ -148,4 +148,27 @@ final class HomeViewModelTests: XCTestCase {
|
||||
XCTAssertEqual(viewModel.commonMenus.map(\.uri), ["wallet"])
|
||||
XCTAssertEqual(session.requests.count, 1)
|
||||
}
|
||||
|
||||
func testRefreshLocalDisplayStateClearsWhenNameMissing() {
|
||||
appStore.currentScenicId = 10
|
||||
appStore.currentScenicName = ""
|
||||
let viewModel = HomeViewModel(appStore: appStore)
|
||||
|
||||
viewModel.refreshLocalDisplayState()
|
||||
|
||||
XCTAssertEqual(viewModel.currentScenicName, "")
|
||||
XCTAssertEqual(appStore.currentScenicId, 0)
|
||||
XCTAssertEqual(appStore.currentScenicName, "")
|
||||
}
|
||||
|
||||
func testRefreshLocalDisplayStateClearsWhenIdMissing() {
|
||||
appStore.currentScenicId = 0
|
||||
appStore.currentScenicName = "残留名称"
|
||||
let viewModel = HomeViewModel(appStore: appStore)
|
||||
|
||||
viewModel.refreshLocalDisplayState()
|
||||
|
||||
XCTAssertEqual(viewModel.currentScenicName, "")
|
||||
XCTAssertEqual(appStore.currentScenicName, "")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user