完善首页权限申请流程与队列播报体验。
对齐 Android 无权限强制弹窗、角色下拉与申请页交互,补充 UIButton configuration 适配,并增强景区排队 TTS 与相关单元测试。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@ -49,6 +49,25 @@ final class StatisticsViewModelTests: XCTestCase {
|
||||
XCTAssertEqual(viewModel.rangeValue(for: "本月"), "4")
|
||||
}
|
||||
|
||||
func testPeriodButtonCapsuleCornerRadiusUsesHalfHeight() {
|
||||
let button = StatisticsPeriodButton(frame: CGRect(x: 0, y: 0, width: 80, height: 32))
|
||||
|
||||
button.setNeedsLayout()
|
||||
button.layoutIfNeeded()
|
||||
|
||||
XCTAssertEqual(button.layer.cornerRadius, 16)
|
||||
}
|
||||
|
||||
func testPeriodButtonFixedCornerRadiusDoesNotFollowHeight() {
|
||||
let button = StatisticsPeriodButton(frame: CGRect(x: 0, y: 0, width: 80, height: 32))
|
||||
button.cornerStyle = .fixed(10)
|
||||
|
||||
button.setNeedsLayout()
|
||||
button.layoutIfNeeded()
|
||||
|
||||
XCTAssertEqual(button.layer.cornerRadius, 10)
|
||||
}
|
||||
|
||||
func testFormattedSelectedPeriodTimeForToday() {
|
||||
let viewModel = StatisticsViewModel()
|
||||
let text = viewModel.formattedSelectedPeriodTime(for: "今日")
|
||||
|
||||
Reference in New Issue
Block a user