45 lines
1.2 KiB
Swift
45 lines
1.2 KiB
Swift
//
|
|
// AutoCat2UITests.swift
|
|
// AutoCat2UITests
|
|
//
|
|
// Created by Selim Mustafaev on 05.03.2022.
|
|
//
|
|
|
|
import XCTest
|
|
import AutoCatCore
|
|
|
|
class AutoCat2UITests: XCTestCase {
|
|
|
|
private let testLogin = "test@gmail.com"
|
|
private let testPassword = "12345"
|
|
|
|
override func setUpWithError() throws {
|
|
|
|
continueAfterFailure = false
|
|
}
|
|
|
|
override func tearDownWithError() throws {
|
|
// Put teardown code here. This method is called after the invocation of each test method in the class.
|
|
}
|
|
|
|
func testExample() throws {
|
|
|
|
let app = XCUIApplication()
|
|
app.launchArguments += ["UI-TESTING"]
|
|
app.launchEnvironment["testKind"] = Testing.TestKind.addNumberSuccess.rawValue
|
|
app.launch()
|
|
|
|
let loginButton = app.buttons["loginButton"]
|
|
guard loginButton.waitForExistence(timeout: 5) else {
|
|
XCTFail("Login button not found")
|
|
return
|
|
}
|
|
|
|
app.textFields["emailTextField"].tap()
|
|
app.textFields["emailTextField"].typeText(testLogin)
|
|
app.secureTextFields["passwordTextField"].tap()
|
|
app.secureTextFields["passwordTextField"].typeText(testPassword)
|
|
loginButton.tap()
|
|
}
|
|
}
|