@@ -217,13 +217,25 @@ def test_multi_touch
217
217
218
218
def test_start_activity
219
219
stub_request ( :post , "#{ SESSION } /appium/device/start_activity" )
220
+ . with ( body : { appPackage : 'package' , appActivity : 'activity' } . to_json )
220
221
. to_return ( headers : HEADER , status : 200 , body : { value : '' } . to_json )
221
-
222
222
@driver . start_activity ( app_activity : 'activity' , app_package : 'package' )
223
223
224
224
assert_requested ( :post , "#{ SESSION } /appium/device/start_activity" , times : 1 )
225
225
end
226
226
227
+ def test_start_activity_with_wait
228
+ stub_request ( :post , "#{ SESSION } /appium/device/start_activity" )
229
+ . with ( body : { appPackage : 'package' , appActivity : 'activity' ,
230
+ appWaitPackage : 'wait_package' , appWaitActivity : 'wait_activity' } . to_json )
231
+ . to_return ( headers : HEADER , status : 200 , body : { value : '' } . to_json )
232
+
233
+ @driver . start_activity ( app_activity : 'activity' , app_package : 'package' ,
234
+ app_wait_package : 'wait_package' , app_wait_activity : 'wait_activity' )
235
+
236
+ assert_requested ( :post , "#{ SESSION } /appium/device/start_activity" , times : 1 )
237
+ end
238
+
227
239
def test_set_network_connection
228
240
stub_request ( :post , "#{ SESSION } /network_connection" )
229
241
. to_return ( headers : HEADER , status : 200 , body : { value : '' } . to_json )
0 commit comments