Fix for UI test
This commit is contained in:
parent
a0b7c0f052
commit
1b952af498
@ -73,6 +73,8 @@ class PlateView: UIView {
|
||||
|
||||
self.flagLayer.contentsScale = UIScreen.main.scale
|
||||
self.layer.addSublayer(self.flagLayer)
|
||||
|
||||
self.isAccessibilityElement = true
|
||||
}
|
||||
|
||||
private func pathForFlag(in rect: CGRect) -> CGPath {
|
||||
|
||||
@ -31,10 +31,11 @@ class AutoCat2UITests: XCTestCase {
|
||||
app.auth(login: testLogin, password: testPassword)
|
||||
app.enterPlateNumber("Н282СН61")
|
||||
|
||||
XCTAssert(app.tables["historyTable"].waitForExistence(timeout: 3), "History tableView not found")
|
||||
let tableViewExists = app.tables["historyTable"].waitForExistence(timeout: 3)
|
||||
XCTAssert(tableViewExists, "History tableView not found")
|
||||
|
||||
let firstCell = app.cells.firstMatch
|
||||
let plateView = firstCell.otherElements["plateView"].firstMatch
|
||||
print(plateView)
|
||||
let plateView = firstCell.descendants(matching: .other)["plateView"]
|
||||
XCTAssert(plateView.label == "Н282СН61", "Plate number don't mach")
|
||||
}
|
||||
}
|
||||
|
||||
@ -18,7 +18,7 @@ public class StorageService: StorageServiceProtocol {
|
||||
if let instance = StorageService.instance {
|
||||
return instance
|
||||
} else {
|
||||
let service = StorageService()
|
||||
let service = StorageService(inMemory: Testing.isUITesting)
|
||||
try await service.loadPersistentStores()
|
||||
StorageService.instance = service
|
||||
return service
|
||||
|
||||
Loading…
Reference in New Issue
Block a user