Fix TabBar icon assets and simplify Podfile post_install.
Rename tab icons to snake_case with @2x/@3x scales, register CYL plus button at app launch, and remove redundant Podfile hooks already covered by the Xcode project. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@ -41,6 +41,21 @@ final class MainScanPlusButtonTests: XCTestCase {
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
/// 测试各 Tab 的图标资源可被加载并挂载到 tabBarItem。
|
||||
func testMainTabBarControllerTabBarItemsHaveImages() {
|
||||
let services = AppServices(apiClient: APIClient(session: MainTabRecordingURLSession()))
|
||||
let controller = MainTabBarController(services: services)
|
||||
controller.loadViewIfNeeded()
|
||||
|
||||
for tab in AppTab.allCases {
|
||||
let item = controller.navigationController(for: tab)?.tabBarItem
|
||||
XCTAssertNotNil(item?.image, "tab \(tab.rawValue) image should not be nil")
|
||||
XCTAssertNotNil(item?.selectedImage, "tab \(tab.rawValue) selectedImage should not be nil")
|
||||
XCTAssertGreaterThan(item?.image?.size.width ?? 0, 0)
|
||||
XCTAssertGreaterThan(item?.selectedImage?.size.width ?? 0, 0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// 主 Tab 测试使用的空网络会话,确保容器加载不触发真实请求。
|
||||
|
||||
Reference in New Issue
Block a user