Skip to content

Instantly share code, notes, and snippets.

@mpahuja
Created September 24, 2019 06:30
Show Gist options
  • Save mpahuja/eefdd9243fc10c1b8e5dd322b03c4a82 to your computer and use it in GitHub Desktop.
Save mpahuja/eefdd9243fc10c1b8e5dd322b03c4a82 to your computer and use it in GitHub Desktop.
Pages - MapView.swift
import XCTest
public final class MapViewPage: BasePage {
// Mark: - Page UI elements
private var thirdView: XCUIElement {
return app.tabBars.buttons["Third"]
}
private var mapComponent: XCUIElement {
return app.maps.element
}
private var currentLocation: XCUIElement {
return app.otherElements["San Francisco, California"]
}
// Mark: Page UI element interation
public func tapThirdViewTab() {
return self.thirdView.tap()
}
public func isMapDisplayed() -> Bool {
return self.mapComponent.waitForExistence(timeout: 10.0)
}
public func getDebugDescription() -> Any {
return app.debugDescription
}
public func isPointerDisplayed() -> Bool {
return self.currentLocation.waitForExistence(timeout: 10.0)
}
}
extension BaseTest {
public var mapViewPage: MapViewPage {
return getPage()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment