@@ -20,7 +20,7 @@ describe("ios actions", function () {
2020 var driver ;
2121 var allPassed = true ;
2222
23- before ( function ( ) {
23+ beforeEach ( function ( ) {
2424 var serverConfig = process . env . npm_package_config_sauce ?
2525 serverConfigs . sauce : serverConfigs . local ;
2626 driver = wd . promiseChainRemote ( serverConfig ) ;
@@ -55,21 +55,20 @@ describe("ios actions", function () {
5555 . then ( function ( el ) {
5656 var action = new wd . TouchAction ( driver ) ;
5757 action
58- . tap ( { el : el , x : 10 , y : 10 } )
59- . release ( ) ;
58+ . tap ( { el : el , x : 10 , y : 10 } ) ;
6059 return driver . performTouchAction ( action ) ;
6160 } )
6261 . elementByAccessibilityId ( 'ComputeSumButton' )
6362 . then ( function ( el ) {
6463 var action = new wd . TouchAction ( driver ) ;
6564 action
66- . tap ( { el : el , x : 10 , y : 10 } )
67- . release ( ) ;
65+ . tap ( { el : el , x : 10 , y : 10 } ) ;
6866 return action . perform ( ) ;
6967 } ) ;
7068 } ) ;
7169
72- it ( "should execute a multi action" , function ( ) {
70+ // TODO: MultiAction not yet implemented. Re-enable this test when they are.
71+ xit ( "should execute a multi action" , function ( ) {
7372 return driver . chain ( )
7473 . then ( function ( ) {
7574 return driver
@@ -106,59 +105,61 @@ describe("ios actions", function () {
106105 it ( "should swipe" , function ( ) {
107106 return driver
108107 . waitForElementByName ( 'Test Gesture' , 5000 ) . click ( )
109- . sleep ( 1000 )
110- . elementByName ( 'OK ' ) . click ( )
111- . sleep ( 1000 )
112- . elementByXPath ( '//UIAMapView ' ) . getLocation ( )
108+ . sleep ( 3000 )
109+ . elementByName ( 'Allow ' ) . click ( )
110+ . sleep ( 3000 )
111+ . elementByXPath ( '//XCUIElementTypeMap ' ) . getLocation ( )
113112 . then ( function ( loc ) {
114113 return driver . swipe ( { startX : loc . x , startY : loc . y ,
115114 endX : 0.5 , endY : loc . y , duration : 800 } ) ;
116115 } ) ;
117116 } ) ;
118117
119- it ( "should pinch" , function ( ) {
118+ // TODO: MultiAction not yet implemented. Re-enable this test when they are.
119+ xit ( "should pinch" , function ( ) {
120120 return driver
121121 . waitForElementByName ( 'Test Gesture' , 5000 ) . click ( )
122- . sleep ( 1000 )
123- . elementByName ( 'OK ' ) . click ( )
124- . sleep ( 1000 )
125- . elementByXPath ( '//UIAMapView ' )
122+ . sleep ( 3000 )
123+ . elementByName ( 'Allow ' ) . click ( )
124+ . sleep ( 3000 )
125+ . elementByXPath ( '//XCUIElementTypeMap ' )
126126 . then ( function ( el ) {
127127 return driver . pinch ( el ) ;
128128 } ) ;
129129 } ) ;
130130
131- it ( "should pinch el" , function ( ) {
131+ // TODO: MultiAction not yet implemented. Re-enable this test when they are.
132+ xit ( "should pinch el" , function ( ) {
132133 return driver
133134 . waitForElementByName ( 'Test Gesture' , 5000 ) . click ( )
135+ . sleep ( 2000 )
136+ . elementByName ( 'Allow' ) . click ( )
134137 . sleep ( 1000 )
135- . elementByName ( 'OK' ) . click ( )
136- . sleep ( 1000 )
137- . elementByXPath ( '//UIAMapView' )
138+ . elementByXPath ( '//XCUIElementTypeMap' )
138139 . then ( function ( el ) {
139140 return el . pinch ( ) ;
140141 } ) ;
141142 } ) ;
142143
143- it ( "should zoom" , function ( ) {
144+ xit ( "should zoom" , function ( ) {
144145 return driver
145146 . waitForElementByName ( 'Test Gesture' , 5000 ) . click ( )
146- . sleep ( 1000 )
147- . elementByName ( 'OK ' ) . click ( )
148- . sleep ( 1000 )
149- . elementByXPath ( '//UIAMapView ' )
147+ . sleep ( 3000 )
148+ . elementByName ( 'Allow ' ) . click ( )
149+ . sleep ( 3000 )
150+ . elementByXPath ( '//XCUIElementTypeMap ' )
150151 . then ( function ( el ) {
151152 return driver . zoom ( el ) ;
152153 } ) ;
153154 } ) ;
154155
155- it ( "should zoom el" , function ( ) {
156+ xit ( "should zoom el" , function ( ) {
156157 return driver
157158 . waitForElementByName ( 'Test Gesture' , 5000 ) . click ( )
159+ . sleep ( 3000 )
160+ . elementByName ( 'Allow' ) . click ( )
158161 . sleep ( 1000 )
159- . elementByName ( 'OK' ) . click ( )
160- . sleep ( 1000 )
161- . elementByXPath ( '//UIAMapView' )
162+ . elementByXPath ( '//XCUIElementTypeMap' )
162163 . then ( function ( el ) {
163164 return el . zoom ( ) ;
164165 } ) ;
0 commit comments