theappbusiness / TABTestKit

Library designed to make writing and maintaining automated tests for iOS applications. This includes automation of bio-metrics and controlling of mock servers
MIT License
59 stars 13 forks source link

Support asserting tab bar tab count #66

Closed KaneCheshire closed 3 years ago

KaneCheshire commented 4 years ago
protocol TabBarContext {}
extension TabBarContext {

    func numberOfTabs(in tabBar: TabBar, is count: Int) {
        XCTAssertEqual(tabBar.numberOfTabs, count)
    }

}

and

extension TabBar {

    var numberOfTabs: Int {
        await(.exists, .hittable)
        return underlyingXCUIElement.buttons.count
    }

}