@@ -20,51 +20,44 @@ class RegistrationUITests: UITestCase {
2020 super. tearDown ( )
2121 }
2222
23- func testCountryCodeSelectionScreenNavigation ( ) {
23+ func DISABLED_testCountryCodeSelectionScreenStandardSelect ( ) {
2424 app. buttons [ " Country Code " ] . tap ( )
25-
26- XCTAssert ( app. staticTexts [ " Select Country Code " ] . exists)
27- }
25+ app. tables. staticTexts [ " Bahrain " ] . tap ( )
2826
29- func testCountryCodeSelectionScreenBackNavigation( ) {
30- app. buttons [ " Country Code " ] . tap ( )
31- app. navigationBars [ " Select Country Code " ] . buttons [ " btnCancel white " ] . tap ( )
32-
33- XCTAssert ( app. staticTexts [ " Your Phone Number " ] . exists)
27+ // TEST DISABLED because implicit scrolling is broken in XCode8 Beta
28+ XCTAssert ( app. buttons [ " Bahrain " ] . exists)
29+ XCTAssert ( app. buttons [ " +33 " ] . exists)
3430 }
3531
3632 func testCountryCodeSelectionScreenSearch( ) {
3733 app. buttons [ " Country Code " ] . tap ( )
34+
35+ XCTAssert ( app. staticTexts [ " Afghanistan " ] . exists)
3836 let searchField = app. tables. children ( matching: . searchField) . element
3937 searchField. tap ( )
4038 searchField. typeText ( " Fran " )
41-
4239 XCTAssert ( app. staticTexts [ " France " ] . exists)
43- }
40+ XCTAssert ( !app . staticTexts [ " Afghanistan " ] . exists )
4441
45- func testCountryCodeSelectionScreenStandardSelect( ) {
46- app. buttons [ " Country Code " ] . tap ( )
4742 app. tables. staticTexts [ " France " ] . tap ( )
48-
43+
4944 XCTAssert ( app. buttons [ " France " ] . exists)
5045 XCTAssert ( app. buttons [ " +33 " ] . exists)
5146 }
5247
53- func testCountryCodeSelectionScreenSearchSelect ( ) {
48+ func testCountryCodeSelectionScreenBackNavigation ( ) {
5449 app. buttons [ " Country Code " ] . tap ( )
55- let searchField = app. tables. children ( matching: . searchField) . element
56- searchField. tap ( )
57- searchField. typeText ( " Fran " )
58- app. tables. staticTexts [ " France " ] . tap ( )
59-
60- XCTAssert ( app. buttons [ " France " ] . exists)
61- XCTAssert ( app. buttons [ " +33 " ] . exists)
50+ app. navigationBars [ " Select Country Code " ] . buttons [ " btnCancel white " ] . tap ( )
51+
52+ XCTAssert ( app. staticTexts [ " Your Phone Number " ] . exists)
6253 }
6354
6455 func testVerifyUnsupportedPhoneNumberAlert( ) {
6556 app. buttons [ " Verify This Device " ] . tap ( )
66-
67- XCTAssert ( app. alerts [ " Registration Error " ] . exists)
57+
58+ let alert = app. alerts [ " Registration Error " ]
59+ expectation ( for: Predicate ( format: " exists == 1 " ) , evaluatedWith: alert, handler: nil )
60+ waitForExpectations ( withTimeout: 5 , handler: nil )
6861 }
6962
7063 func testVerifySupportedPhoneNumberChangeNumberNavigation( ) {
0 commit comments