1234567891011121314151617181920212223242526272829303132333435 |
- import XCTest
- class BaseUIXCTestCase: XCTestCase {
- let timeoutSeconds: Double = 100
- override final class var runsForEachTargetApplicationUIConfiguration: Bool {
- false
- }
- internal func waitForEnabled(object: Any?) {
- let predicate = NSPredicate(format: "enabled == true")
- expectation(for: predicate, evaluatedWith: object, handler: nil)
- waitForExpectations(timeout: timeoutSeconds, handler: nil)
- }
- internal func waitForHittable(object: Any?) {
- let predicate = NSPredicate(format: "hittable == true")
- expectation(for: predicate, evaluatedWith: object, handler: nil)
- waitForExpectations(timeout: timeoutSeconds, handler: nil)
- }
- internal func waitForEnabledAndHittable(object: Any?) {
- waitForEnabled(object: object)
- waitForHittable(object: object)
- }
- }
|