集成 MJRefresh 并重构主 TabBar 为系统 TabView 样式。

新增 SwiftUI 桥接层与单元测试,更新 Tab 图标资源命名和多倍图,同步调整 UI Test 的 Tab/扫码定位逻辑。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-29 10:22:53 +08:00
parent 79e735f628
commit 8997d1ba1c
140 changed files with 6574 additions and 877 deletions

View File

@ -0,0 +1,38 @@
//
// MJRefreshSupportTests.swift
// suixinkanTests
//
// Created by Codex on 2026/6/26.
//
import XCTest
@testable import suixinkan
/// MJRefresh SwiftUI
final class MJRefreshSupportTests: XCTestCase {
/// UIScrollView
func testEnclosingScrollViewFindsParentScrollView() {
let scrollView = UIScrollView(frame: CGRect(x: 0, y: 0, width: 320, height: 480))
let container = UIView(frame: scrollView.bounds)
let anchor = UIView(frame: .zero)
scrollView.addSubview(container)
container.addSubview(anchor)
XCTAssertIdentical(anchor.enclosingScrollView, scrollView)
}
/// ScrollView nil
func testEnclosingScrollViewReturnsNilWithoutScrollView() {
let view = UIView(frame: .zero)
XCTAssertNil(view.enclosingScrollView)
}
}
extension MJRefreshSupportTests {
///
fileprivate func XCTAssertIdentical(_ expression1: AnyObject?, _ expression2: AnyObject?, file: StaticString = #filePath, line: UInt = #line) {
if expression1 !== expression2 {
XCTFail("Expected identical objects", file: file, line: line)
}
}
}