@@ -7,7 +7,7 @@ final class ContentViewTests: XCTestCase {
77 func test_initialCount( ) throws {
88 let sut = ContentView ( )
99
10- let count = try sut. inspect ( ) . find ( viewWithId : " count " ) . text ( ) . string ( )
10+ let count = try sut. inspect ( ) . find ( viewWithAccessibilityIdentifier : " count " ) . text ( ) . string ( )
1111
1212 XCTAssertEqual ( count, " 0 " )
1313 }
@@ -17,8 +17,8 @@ final class ContentViewTests: XCTestCase {
1717 func test_incrementOnce_withBoilerplate( ) throws {
1818 var sut = ContentView ( )
1919 let expectation = sut. on ( \. viewInspectorHook) { view in
20- try view. find ( viewWithId : " increment " ) . button ( ) . tap ( )
21- let count = try view. find ( viewWithId : " count " ) . text ( ) . string ( )
20+ try view. find ( viewWithAccessibilityIdentifier : " increment " ) . button ( ) . tap ( )
21+ let count = try view. find ( viewWithAccessibilityIdentifier : " count " ) . text ( ) . string ( )
2222 XCTAssertEqual ( count, " 1 " )
2323 }
2424 ViewHosting . host ( view: sut)
@@ -32,8 +32,8 @@ final class ContentViewTests: XCTestCase {
3232 func test_incrementOnce_withTestableView( ) throws {
3333 var sut = ContentView ( )
3434 inspectChangingView ( & sut) { view in
35- try view. find ( viewWithId : " increment " ) . button ( ) . tap ( )
36- let count = try view. find ( viewWithId : " count " ) . text ( ) . string ( )
35+ try view. find ( viewWithAccessibilityIdentifier : " increment " ) . button ( ) . tap ( )
36+ let count = try view. find ( viewWithAccessibilityIdentifier : " count " ) . text ( ) . string ( )
3737 XCTAssertEqual ( count, " 1 " )
3838 }
3939 }
@@ -46,8 +46,8 @@ final class ContentViewTests: XCTestCase {
4646 var count : String ?
4747
4848 inspectChangingView ( & sut) { view in
49- try view. find ( viewWithId : " increment " ) . button ( ) . tap ( )
50- count = try view. find ( viewWithId : " count " ) . text ( ) . string ( )
49+ try view. find ( viewWithAccessibilityIdentifier : " increment " ) . button ( ) . tap ( )
50+ count = try view. find ( viewWithAccessibilityIdentifier : " count " ) . text ( ) . string ( )
5151 }
5252
5353 XCTAssertEqual ( count, " 1 " )
0 commit comments