Reorganize docs and update reader search flows
This commit is contained in:
@@ -67,6 +67,7 @@ final class SearchTests: XCTestCase {
|
||||
func testSearchFindsMatchesAndShowsCount() {
|
||||
app.launchAndOpenSampleBook(searchKeyword: "的")
|
||||
app.waitForReader()
|
||||
app.showReaderChromeIfNeeded()
|
||||
|
||||
let countLabel = app.staticTexts[IDs.searchCount]
|
||||
XCTAssertTrue(countLabel.waitForExistence(timeout: 10), "匹配计数标签应出现")
|
||||
@@ -83,6 +84,7 @@ final class SearchTests: XCTestCase {
|
||||
func testSearchNavigatesToFirstMatch() {
|
||||
app.launchAndOpenSampleBook(searchKeyword: "的")
|
||||
app.waitForReader()
|
||||
app.showReaderChromeIfNeeded()
|
||||
|
||||
let countLabel = app.staticTexts[IDs.searchCount]
|
||||
XCTAssertTrue(countLabel.waitForExistence(timeout: 10), "匹配计数应出现")
|
||||
@@ -94,6 +96,7 @@ final class SearchTests: XCTestCase {
|
||||
func testSearchNextButtonAdvancesMatch() {
|
||||
app.launchAndOpenSampleBook(searchKeyword: "的")
|
||||
app.waitForReader()
|
||||
app.showReaderChromeIfNeeded()
|
||||
|
||||
let countLabel = app.staticTexts[IDs.searchCount]
|
||||
XCTAssertTrue(countLabel.waitForExistence(timeout: 10))
|
||||
@@ -109,6 +112,7 @@ final class SearchTests: XCTestCase {
|
||||
func testSearchPreviousButtonGoesBack() {
|
||||
app.launchAndOpenSampleBook(searchKeyword: "的")
|
||||
app.waitForReader()
|
||||
app.showReaderChromeIfNeeded()
|
||||
|
||||
let countLabel = app.staticTexts[IDs.searchCount]
|
||||
XCTAssertTrue(countLabel.waitForExistence(timeout: 10))
|
||||
@@ -129,6 +133,7 @@ final class SearchTests: XCTestCase {
|
||||
func testSearchNextWrapsAround() {
|
||||
app.launchAndOpenSampleBook(searchKeyword: "的")
|
||||
app.waitForReader()
|
||||
app.showReaderChromeIfNeeded()
|
||||
|
||||
let countLabel = app.staticTexts[IDs.searchCount]
|
||||
XCTAssertTrue(countLabel.waitForExistence(timeout: 10))
|
||||
@@ -158,6 +163,7 @@ final class SearchTests: XCTestCase {
|
||||
func testSearchWithNoResultsShowsZeroCount() {
|
||||
app.launchAndOpenSampleBook(searchKeyword: "xyzzy_nonexistent_keyword_12345")
|
||||
app.waitForReader()
|
||||
app.showReaderChromeIfNeeded()
|
||||
|
||||
let countLabel = app.staticTexts[IDs.searchCount]
|
||||
XCTAssertTrue(countLabel.waitForExistence(timeout: 10), "计数标签应出现")
|
||||
@@ -167,6 +173,7 @@ final class SearchTests: XCTestCase {
|
||||
func testSearchNavigationDisabledWhenNoResults() {
|
||||
app.launchAndOpenSampleBook(searchKeyword: "xyzzy_nonexistent_keyword_12345")
|
||||
app.waitForReader()
|
||||
app.showReaderChromeIfNeeded()
|
||||
|
||||
let countLabel = app.staticTexts[IDs.searchCount]
|
||||
XCTAssertTrue(countLabel.waitForExistence(timeout: 10))
|
||||
@@ -185,6 +192,7 @@ final class SearchTests: XCTestCase {
|
||||
func testCloseSearchClearsState() {
|
||||
app.launchAndOpenSampleBook(searchKeyword: "的")
|
||||
app.waitForReader()
|
||||
app.showReaderChromeIfNeeded()
|
||||
|
||||
let countLabel = app.staticTexts[IDs.searchCount]
|
||||
XCTAssertTrue(countLabel.waitForExistence(timeout: 10))
|
||||
@@ -206,6 +214,7 @@ final class SearchTests: XCTestCase {
|
||||
func testSearchBarHidesWhenToolbarsHide() {
|
||||
app.launchAndOpenSampleBook(searchKeyword: "的")
|
||||
app.waitForReader()
|
||||
app.showReaderChromeIfNeeded()
|
||||
|
||||
let searchBar = app.otherElements[IDs.searchBar]
|
||||
XCTAssertTrue(searchBar.waitForExistence(timeout: 10), "搜索栏应可见")
|
||||
@@ -219,6 +228,7 @@ final class SearchTests: XCTestCase {
|
||||
func testSearchBarRestoresWhenToolbarsShow() {
|
||||
app.launchAndOpenSampleBook(searchKeyword: "的")
|
||||
app.waitForReader()
|
||||
app.showReaderChromeIfNeeded()
|
||||
|
||||
let searchBar = app.otherElements[IDs.searchBar]
|
||||
XCTAssertTrue(searchBar.waitForExistence(timeout: 10))
|
||||
|
||||
Reference in New Issue
Block a user