Stop stale command palette empty-state flashes
This commit is contained in:
parent
2877e2c80a
commit
0322e78e8a
2 changed files with 14 additions and 1 deletions
|
|
@ -4539,7 +4539,6 @@ struct ContentView: View {
|
|||
}
|
||||
|
||||
return currentMatchingQuery == resolvedMatchingQuery
|
||||
|| currentMatchingQuery.hasPrefix(resolvedMatchingQuery)
|
||||
}
|
||||
|
||||
private func scheduleCommandPaletteResultsRefresh(
|
||||
|
|
|
|||
|
|
@ -499,6 +499,20 @@ final class CommandPaletteSearchEngineTests: XCTestCase {
|
|||
)
|
||||
}
|
||||
|
||||
func testPendingEmptyStateIsPreservedForSameResolvedNoMatchQuery() {
|
||||
XCTAssertTrue(
|
||||
ContentView.commandPaletteShouldPreserveEmptyStateWhileSearchPending(
|
||||
isSearchPending: true,
|
||||
visibleResultsScopeMatches: true,
|
||||
resolvedSearchScopeMatches: true,
|
||||
resolvedSearchFingerprintMatches: true,
|
||||
resolvedResultsAreEmpty: true,
|
||||
currentMatchingQuery: "zzzzzzzz",
|
||||
resolvedMatchingQuery: "zzzzzzzz"
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
func testPendingEmptyStateIsNotPreservedWhenQueryDoesNotRefineResolvedNoMatch() {
|
||||
XCTAssertFalse(
|
||||
ContentView.commandPaletteShouldPreserveEmptyStateWhileSearchPending(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue