升级 AppStore 缓存 Key 并在覆盖安装时强制重新登录。
统一账号作用域 Key 对齐 Android,新增缓存 schema 迁移清理旧数据,并同步更新相关模块与单元测试。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@ -250,6 +250,7 @@ final class ScenicQueueFeatureTests: XCTestCase {
|
||||
|
||||
store.session.userId = "1"
|
||||
store.session.accountType = .unknown("photog")
|
||||
store.session.currentScenicId = 11
|
||||
store.scenicQueue.punchSpotId = "22"
|
||||
store.scenicQueue.punchSpotName = "东门打卡点"
|
||||
store.scenicQueue.remark = "播报"
|
||||
@ -258,16 +259,19 @@ final class ScenicQueueFeatureTests: XCTestCase {
|
||||
|
||||
store.session.userId = "2"
|
||||
store.session.accountType = .unknown("photog")
|
||||
store.session.currentScenicId = 11
|
||||
XCTAssertEqual(store.scenicQueue.punchSpotId, "")
|
||||
XCTAssertNil(store.scenicQueue.settingsSnapshot())
|
||||
|
||||
store.session.userId = "1"
|
||||
store.session.accountType = .unknown("photog")
|
||||
store.session.currentScenicId = 11
|
||||
XCTAssertEqual(store.scenicQueue.punchSpotId, "22")
|
||||
XCTAssertEqual(store.scenicQueue.presetVoices(), ["a", "b", "c", "d", "e"])
|
||||
store.logout()
|
||||
store.session.userId = "1"
|
||||
store.session.accountType = .unknown("photog")
|
||||
store.session.currentScenicId = 11
|
||||
XCTAssertEqual(store.scenicQueue.punchSpotId, "")
|
||||
XCTAssertNil(store.scenicQueue.settingsSnapshot())
|
||||
}
|
||||
@ -323,6 +327,8 @@ final class ScenicQueueFeatureTests: XCTestCase {
|
||||
let store = AppStore(defaults: defaults)
|
||||
store.session.userId = "u1"
|
||||
store.session.accountType = .unknown("photog")
|
||||
store.session.currentScenicId = 11
|
||||
XCTAssertTrue(store.scenicQueue.useOfflineTTS)
|
||||
let tts = MockScenicQueueTTSManager()
|
||||
let viewModel = ScenicQueueSettingsViewModel(appStore: store, ttsManager: tts)
|
||||
var messages: [String] = []
|
||||
|
||||
Reference in New Issue
Block a user