@@ -184,7 +184,7 @@ test('resolveMacOsHelperPackageRootFrom finds helper package from source and dis
184184 }
185185} ) ;
186186
187- test ( 'iosRunnerOverrides gives fling a short default XCUITest drag hold ' , async ( ) => {
187+ test ( 'iosRunnerOverrides maps iOS fling duration to synthesized drag' , async ( ) => {
188188 mockRunIosRunnerCommand . mockResolvedValue ( { } ) ;
189189
190190 const { overrides } = iosRunnerOverrides ( IOS_TEST_SIMULATOR , {
@@ -200,6 +200,7 @@ test('iosRunnerOverrides gives fling a short default XCUITest drag hold', async
200200 x2 : 180 ,
201201 y2 : 200 ,
202202 durationMs : 16 ,
203+ synthesized : true ,
203204 appBundleId : 'com.example.App' ,
204205 } ) ;
205206} ) ;
@@ -252,7 +253,7 @@ for (const [name, device] of [
252253 } ) ;
253254}
254255
255- test ( 'iosRunnerOverrides maps swipe to XCTest iOS drag duration ' , async ( ) => {
256+ test ( 'iosRunnerOverrides maps iOS swipe and pan durations to synthesized drag ' , async ( ) => {
256257 mockRunIosRunnerCommand . mockResolvedValue ( { } ) ;
257258
258259 const { overrides } = iosRunnerOverrides ( IOS_TEST_SIMULATOR , {
@@ -270,6 +271,7 @@ test('iosRunnerOverrides maps swipe to XCTest iOS drag duration', async () => {
270271 x2 : 180 ,
271272 y2 : 200 ,
272273 durationMs : 300 ,
274+ synthesized : true ,
273275 appBundleId : 'com.example.App' ,
274276 } ) ;
275277 assert . deepEqual ( mockRunIosRunnerCommand . mock . calls [ 1 ] ?. [ 1 ] , {
@@ -279,6 +281,7 @@ test('iosRunnerOverrides maps swipe to XCTest iOS drag duration', async () => {
279281 x2 : 180 ,
280282 y2 : 200 ,
281283 durationMs : 250 ,
284+ synthesized : true ,
282285 appBundleId : 'com.example.App' ,
283286 } ) ;
284287 assert . deepEqual ( mockRunIosRunnerCommand . mock . calls [ 2 ] ?. [ 1 ] , {
@@ -288,6 +291,7 @@ test('iosRunnerOverrides maps swipe to XCTest iOS drag duration', async () => {
288291 x2 : 180 ,
289292 y2 : 200 ,
290293 durationMs : 300 ,
294+ synthesized : true ,
291295 appBundleId : 'com.example.App' ,
292296 } ) ;
293297} ) ;
@@ -296,14 +300,16 @@ for (const [name, device] of [
296300 [ 'macOS' , MACOS_TEST_DEVICE ] ,
297301 [ 'tvOS' , TVOS_TEST_SIMULATOR ] ,
298302] as const ) {
299- test ( `iosRunnerOverrides keeps ${ name } swipes on the standard drag path` , async ( ) => {
303+ test ( `iosRunnerOverrides keeps ${ name } drag gestures on the standard path` , async ( ) => {
300304 mockRunIosRunnerCommand . mockResolvedValue ( { } ) ;
301305
302306 const { overrides } = iosRunnerOverrides ( device , {
303307 appBundleId : 'com.example.App' ,
304308 } ) ;
305309
306310 await overrides . swipe ( 100 , 200 , 180 , 200 , 300 ) ;
311+ await overrides . pan ( 100 , 200 , 180 , 200 , 300 ) ;
312+ await overrides . fling ( 100 , 200 , 180 , 200 , 300 ) ;
307313
308314 assert . deepEqual ( mockRunIosRunnerCommand . mock . calls [ 0 ] ?. [ 1 ] , {
309315 command : 'drag' ,
@@ -314,6 +320,24 @@ for (const [name, device] of [
314320 durationMs : 300 ,
315321 appBundleId : 'com.example.App' ,
316322 } ) ;
323+ assert . deepEqual ( mockRunIosRunnerCommand . mock . calls [ 1 ] ?. [ 1 ] , {
324+ command : 'drag' ,
325+ x : 100 ,
326+ y : 200 ,
327+ x2 : 180 ,
328+ y2 : 200 ,
329+ durationMs : 300 ,
330+ appBundleId : 'com.example.App' ,
331+ } ) ;
332+ assert . deepEqual ( mockRunIosRunnerCommand . mock . calls [ 2 ] ?. [ 1 ] , {
333+ command : 'drag' ,
334+ x : 100 ,
335+ y : 200 ,
336+ x2 : 180 ,
337+ y2 : 200 ,
338+ durationMs : 300 ,
339+ appBundleId : 'com.example.App' ,
340+ } ) ;
317341 } ) ;
318342}
319343
0 commit comments