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
mpahuja-mbp151:test mpahuja$ DEBUG=cypress:cli CYPRESS_INSTALL_BINARY=https://cdn.cypress.io/desktop/3.4.1/darwin-x64/cypress.zip npm i cypress | |
> [email protected] postinstall /Users/mpahuja/opensource/test/node_modules/cypress | |
> node index.js --exec install | |
cypress:cli installing Cypress from NPM +0ms | |
cypress:cli installing with options {} +0ms | |
cypress:cli version in package.json is 3.6.0 +0ms | |
cypress:cli Using CYPRESS_INSTALL_BINARY from environment variable +0ms | |
cypress:cli Using CYPRESS_INSTALL_BINARY from environment variable +0ms |
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 Foundation | |
/// Common semantic timeout values for UI interactions | |
public enum UITestTimeout { | |
/// Time interval for alerts to appear | |
case alertAppear | |
/// Time interval for elements to appear | |
case elementAppear | |
/// Five second time interval | |
case fiveSeconds |
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 | |
final class UserTests: BaseTestCase, AuthenticationUITestable { | |
func test_accountRecoveryStart () { | |
XCTContext.runActivity(named: "Start account recovery") { _ in | |
self.startAccountRecovery(withEmail: UserInfo.LoginSmoke.emailAddress, | |
serverEnvironment: UserInfo.LoginSmoke.serverEnvironment) | |
} | |
} | |
} |
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
/// Common user-specific information | |
public struct UserInfo { | |
/// Keys and values used for login smoke runs | |
public struct Login { | |
/// Email address used to test | |
public static let emailAddress = "[email protected]" | |
} | |
public struct AnotherOne { | |
public static let password = "password" |
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
/// Common user-specific information | |
public struct UserInfo { | |
/// Keys and values used for login smoke runs | |
public struct Login { | |
/// Email address used to test | |
public static let emailAddress = "[email protected]" | |
} | |
public struct AnotherOne { | |
public static let password = "password" |
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 | |
class TableViewTests: BaseTest { | |
func testRowAlert() { | |
XCTContext.runActivity(named: "Test Correct row alert is being shown on random row") { _ in | |
XCTAssertTrue(tableViewPage.isRandomTableDisplayed()) | |
let countOfRows = tableViewPage.countTableRows() | |
XCTAssertGreaterThan(countOfRows, 0) | |
let randomRowElement = Int.random(in: 1 ... countOfRows) | |
let currentRowValue = tableViewPage.getValueAtDesiredRow(desiredIndex: randomRowElement) |
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 | |
class MapViewTests: BaseTest { | |
func testMapLocation() { | |
XCTContext.runActivity(named: "Test Map and pointer are rendered") { _ in | |
mapViewPage.tapThirdViewTab() | |
XCTAssertTrue(mapViewPage.isMapDisplayed()) | |
XCTAssertTrue(mapViewPage.isPointerDisplayed()) | |
} | |
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 | |
private var globalSampleApp: XCUIApplication! | |
open class BaseTest: XCTestCase { | |
private var pages: [String: BasePage] = [:] | |
lazy var sampleApp = XCUIApplication() | |
public let globalSampleApp = XCUIApplication() |
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 |
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 TableViewPage: BasePage { | |
// Mark: - Page UI elements | |
private var entireTable: XCUIElement { | |
return app.tables.allElementsBoundByAccessibilityElement[0] | |
} | |
private var countTableRow: XCUIElementQuery { | |
return app.tables.cells |
NewerOlder