完善阅读器主题与批注界面

This commit is contained in:
shenlei
2026-07-13 13:01:14 +09:00
parent adc24d3f36
commit 6a0a1223b1
22 changed files with 133 additions and 189 deletions
@@ -38,25 +38,6 @@ final class ToolbarStateTests: XCTestCase {
app.waitForDemoReaderState(timeout: 5, description: "reader=opened") { $0.isOpened }
}
func testAddHighlightButtonDisabledWithoutSelection() throws {
app.launchAndOpenSampleBook()
app.waitForReader(timeout: 12)
app.showReaderChromeIfNeeded()
let addHighlightButton = app.buttons[IDs.readerAddHighlight]
XCTAssertTrue(addHighlightButton.waitForExistence(timeout: 3), "标注按钮应存在")
let beforeState = app.waitForDemoReaderState(timeout: 3, description: "初始高亮数") { $0.highlights != nil }
let highlightsBefore = beforeState.highlights ?? 0
addHighlightButton.tap()
let afterState = app.waitForDemoReaderState(timeout: 3, description: "点击后的高亮数") { $0.highlights != nil }
let highlightsAfter = afterState.highlights ?? 0
XCTAssertEqual(highlightsAfter, highlightsBefore, "无选区时点击标注按钮不应创建标注")
}
func testPageCurlSwipeNavigation() throws {
app.launchAndOpenSampleBook(displayType: "pagecurl")
app.waitForReader(timeout: 12)