42 lines
1.1 KiB
Swift
42 lines
1.1 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.setTestKind(.addNumberSuccess)
|
||
app.launch()
|
||
|
||
app.auth(login: testLogin, password: testPassword)
|
||
app.enterPlateNumber("Н282СН61")
|
||
|
||
let tableViewExists = app.tables["historyTable"].waitForExistence(timeout: 3)
|
||
XCTAssert(tableViewExists, "History tableView not found")
|
||
|
||
let firstCell = app.cells.firstMatch
|
||
let plateView = firstCell.descendants(matching: .other)["plateView"]
|
||
XCTAssert(plateView.label == "Н282СН61", "Plate number don't mach")
|
||
}
|
||
}
|