From 4dc18fd90824e9927d92d08fce4ba3c5b747daf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eloy=20Dur=C3=A1n?= Date: Tue, 4 Mar 2014 15:20:10 +0100 Subject: [PATCH] [iOS] Make `flick` UI test helper work on iOS 7. Fixes http://hipbyte.myjetbrains.com/youtrack/issue/RM-437 --- lib/motion/project/template/ios/spec-helpers/ui.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/motion/project/template/ios/spec-helpers/ui.rb b/lib/motion/project/template/ios/spec-helpers/ui.rb index f00cd321..47a1cfd5 100644 --- a/lib/motion/project/template/ios/spec-helpers/ui.rb +++ b/lib/motion/project/template/ios/spec-helpers/ui.rb @@ -349,7 +349,9 @@ module Bacon from, to = _extract_start_and_end_points(view, options) duration = options[:duration] || Functional.default_duration - _event_generator.sendFlickWithStartPoint(from, endPoint:to, duration:duration) + EventDispatcher.dispatch(duration) do + _event_generator.sendFlickWithStartPoint(from, endPoint:to, duration:duration) + end proper_wait(duration) view @@ -455,7 +457,7 @@ module Bacon end end - LOCATION_TO_POINT_INSET = 5 + LOCATION_TO_POINT_INSET = 8 def _location_to_point(view, location, raise_if_invalid = true) frame = view.frame