This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private func loadMoreListings() { | |
if listingViewModelsLegacy.value == nil { | |
loadingEvents.on(.next(.loadingList)) | |
} | |
guard let searchQuery = SearchQuery.deepCopy(model: searchQuery) else { | |
return | |
} | |
currentListRequest?.cancel() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let query = SearchQuery() | |
query.geography = "nyc" | |
query.nePoint = CommonUtilsGeoLocation(location: Location(latitude: 40.9176, longitude: -73.7)) | |
query.swPoint = CommonUtilsGeoLocation(location: Location(latitude: 40.4774, longitude: -74.2591)) | |
query.rentalStatuses = RentalListingStatus.consumer | |
query.saleStatuses = SaleListingStatus.consumer | |
query.geohashLength = 4 | |
query.zoomLevel = 13 | |
query.maxResultsForGranularClustering = 69 | |
query.listingTypes = [.sales] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func suggest(query: String, currentLocation: Location? = nil) { | |
lastQuery = query | |
currentRequest?.cancel() | |
currentRequest = nil | |
let request = SearchSuggestRequestV2() | |
request.q = query | |
request.limit = 10 | |
request.listingTypes = [.sales] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MapBot: Robot, RobotItem { | |
public enum Item: UIElementable { | |
case map | |
case cluster(withText: String) | |
case pricePin(withText: String) | |
case clearAll | |
case schoolPin | |
public func UIElement(on app: XCUIApplication) -> XCUIElement { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func testShowPinsAtMaxZoomLevel() { | |
XCTContext.runActivity(named: "Always show pins at the max zoom level") { _ in | |
CompassLauncher().account(.nycAgent).launch().verifyMore() | |
TabBarBot() | |
.search() | |
.tap(.searchBarTextField) | |
.enterText("East Village") | |
SearchSuggestBot() | |
.tap(.neighborhood) | |
MapBot() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MapBot: Robot, RobotItem { | |
... | |
@discardableResult | |
public func tapAnyCluster() -> MapBot { | |
app.otherElements[mapViewAccessibilityIdentifier] | |
.descendants(matching: .any) | |
.allElementsBoundByIndex | |
.first(where: { $0.label.contains(clusterIdentifier) })? | |
.tap() | |
return self |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MapMarker: GMSMarker { | |
... | |
case .cluster: | |
let cluster = MapClusterView(count: viewModel.count) | |
cluster.text = viewModel.title | |
iconView = cluster | |
accessibilityIdentifier = clusterIdentifier + "_\(cluster.text ?? "")" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.otherElements[mapAccessibilityIdentifier] | |
.descendants(matching: .any)[mapMarkerAccessibilityIdentifier] | |
.firstMatch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MapMarker: GMSMarker { | |
... | |
accessibilityIdentifier = mapMarkerAccessibilityIdentifier | |
... | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MapView: UIView { | |
... | |
public let map = GMSMapView() | |
self.accessibilityIdentifier = mapAccessibilityIdentifier | |
map.accessibilityElementsHidden = false | |
public var pins: [MapMarker]? | |
... | |
} |
NewerOlder