@@ -50,4 +50,51 @@ class ICInputAccessoryUITests: XCTestCase {
5050 accessory. childrenMatchingType ( . Button) . element. tap ( )
5151 }
5252
53+ func testTokenField( ) {
54+ let app = XCUIApplication ( )
55+ let tablesQuery = app. tables
56+ let textField = tablesQuery. cells. containingType ( . StaticText, identifier: " ICTokenField " ) . childrenMatchingType ( . TextField) . element
57+
58+ textField. tap ( )
59+ textField. typeText ( " Try " )
60+ textField. typeText ( " " )
61+ textField. typeText ( " iCook " )
62+ textField. typeText ( " , " )
63+ textField. typeText ( " beta " )
64+ textField. typeText ( " " )
65+
66+ let deleteKey = app. keys [ " delete " ]
67+ deleteKey. tap ( )
68+ deleteKey. tap ( )
69+
70+ textField. typeText ( " TestFlight " )
71+ textField. typeText ( " , " )
72+
73+ let searchButton = app. buttons [ " Search " ]
74+ searchButton. tap ( )
75+ }
76+
77+ func testCustomizedTokenField( ) {
78+ let app = XCUIApplication ( )
79+ app. tables. staticTexts [ " CustomizedTokenField " ] . tap ( )
80+
81+ let tokenField = app. navigationBars [ " Example.CustomizedTokenView " ] . scrollViews. childrenMatchingType ( . TextField) . element
82+ tokenField. typeText ( " Try " )
83+ tokenField. typeText ( " " )
84+ tokenField. typeText ( " iCook " )
85+ tokenField. typeText ( " , " )
86+ tokenField. typeText ( " beta " )
87+ tokenField. typeText ( " " )
88+
89+ let deleteKey = app. keys [ " delete " ]
90+ deleteKey. tap ( )
91+ deleteKey. tap ( )
92+
93+ tokenField. typeText ( " TestFlight " )
94+ tokenField. typeText ( " , " )
95+
96+ let searchButton = app. buttons [ " Search " ]
97+ searchButton. tap ( )
98+ }
99+
53100}
0 commit comments