AutoCat2/AutoCat2UITests/AutoCat2UITests.swift
2022-04-07 01:18:42 +03:00

42 lines
1.1 KiB
Swift
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// 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")
}
}