Fix test build errors: isCacheValid ttlMs parameter and screen object name conflicts

SKIE doesn't expose Kotlin default parameters to Swift, so isCacheValid calls
need explicit ttlMs argument. Renamed struct-based screen objects to avoid
ambiguity with class-based PageObjects (LoginScreenObject, RegisterScreenObject,
MainTabScreenObject).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
treyt
2026-02-24 15:59:48 -06:00
parent 786a9c6fb6
commit 4679764fdf
10 changed files with 24 additions and 24 deletions

View File

@@ -24,19 +24,19 @@ struct DataLayerTests {
@Suite struct CacheValidationTests {
@Test func cacheTimeZeroIsInvalid() {
#expect(DataManager.shared.isCacheValid(cacheTime: 0) == false)
#expect(DataManager.shared.isCacheValid(cacheTime: 0, ttlMs: DataManager.shared.CACHE_TIMEOUT_MS) == false)
}
@Test func recentCacheTimeIsValid() {
// 5 minutes ago should be valid (well within the 1-hour timeout)
let fiveMinutesAgo = Int64(Date().timeIntervalSince1970 * 1000) - (5 * 60 * 1000)
#expect(DataManager.shared.isCacheValid(cacheTime: fiveMinutesAgo) == true)
#expect(DataManager.shared.isCacheValid(cacheTime: fiveMinutesAgo, ttlMs: DataManager.shared.CACHE_TIMEOUT_MS) == true)
}
@Test func expiredCacheTimeIsInvalid() {
// 2 hours ago should be invalid (past the 1-hour timeout)
let twoHoursAgo = Int64(Date().timeIntervalSince1970 * 1000) - (2 * 60 * 60 * 1000)
#expect(DataManager.shared.isCacheValid(cacheTime: twoHoursAgo) == false)
#expect(DataManager.shared.isCacheValid(cacheTime: twoHoursAgo, ttlMs: DataManager.shared.CACHE_TIMEOUT_MS) == false)
}
@Test func cacheTimeoutConstantIsOneHour() {