Created
September 24, 2019 06:30
-
-
Save mpahuja/eefdd9243fc10c1b8e5dd322b03c4a82 to your computer and use it in GitHub Desktop.
Pages - MapView.swift
This file contains 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
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