Skip to content

Commit 8581b8b

Browse files
committed
Add first UI Test.
1 parent 7d0aef0 commit 8581b8b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Sample Project/CheckBoxUITests/CheckBoxUITests.m

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//
88

99
#import <XCTest/XCTest.h>
10+
#import "BEMCheckBox.h"
1011

1112
@interface CheckBoxUITests : XCTestCase
1213

@@ -25,4 +26,15 @@ - (void)tearDown {
2526
[super tearDown];
2627
}
2728

29+
- (void)testOn {
30+
XCUIElement *element = [[[[[[[[XCUIApplication alloc] init].otherElements containingType:XCUIElementTypeNavigationBar identifier:@"BEMCheckBox"] childrenMatchingType:XCUIElementTypeOther].element childrenMatchingType:XCUIElementTypeOther].element childrenMatchingType:XCUIElementTypeOther].element childrenMatchingType:XCUIElementTypeOther] elementBoundByIndex:0];
31+
XCTAssertTrue(element.isHittable);
32+
33+
[element tap];
34+
XCTAssertTrue(element.isHittable);
35+
36+
[element tap];
37+
XCTAssertTrue(element.isHittable);
38+
}
39+
2840
@end

0 commit comments

Comments
 (0)