New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recording interpolation #2

Closed
niklassaers opened this Issue Mar 14, 2012 · 1 comment

Comments

Projects
None yet
2 participants
@niklassaers

niklassaers commented Mar 14, 2012

When we make a recording, we can apply it to a start-target. But it'd be cool also to be able to set an end target, and interpolate the movement in between.

@krukow

This comment has been minimized.

Show comment
Hide comment
@krukow

krukow Mar 14, 2012

Member

This is a very cool feature, it opens the door to all sorts of cool tricks. Thanks for requesting.

I've added initial support for this. It should make it possible to implement e.g., "panning" very simply.

To try, do the following from your project dir

gem update calabash-cucumber
calabash-ios download

Now you have a ruby operation called "interpolate".

It interpolates a recording you've made. For example, I recorded a drag-drop sequence as "pan".
Then I could do:

krukow:/Downloads/Touches/Touches_GestureRecognizers$ ls pan_ios5_iphone.base64
pan_ios5_iphone.base64
krukow:
/Downloads/Touches/Touches_GestureRecognizers$ ./irb_ios5.sh
irb(main):001:0> interpolate "pan", :start => "imageView index:2", :end => "imageView index:0"=> ["<UIImageView: 0x6e9be00; frame = (10 90; 100 100); alpha = 0.9; opaque = NO; autoresize = W+H; layer = <CALayer: 0x6e9caa0>> - YellowSquare.png"]
irb(main):002:0>

It also supports offsets on end and start, via :offset_start => {:x => 10, :y => 10}, :offset_end => {:x => 100, :y => 0}

Screencast.

http://screencast.com/t/P7mg1QJkox

Member

krukow commented Mar 14, 2012

This is a very cool feature, it opens the door to all sorts of cool tricks. Thanks for requesting.

I've added initial support for this. It should make it possible to implement e.g., "panning" very simply.

To try, do the following from your project dir

gem update calabash-cucumber
calabash-ios download

Now you have a ruby operation called "interpolate".

It interpolates a recording you've made. For example, I recorded a drag-drop sequence as "pan".
Then I could do:

krukow:/Downloads/Touches/Touches_GestureRecognizers$ ls pan_ios5_iphone.base64
pan_ios5_iphone.base64
krukow:
/Downloads/Touches/Touches_GestureRecognizers$ ./irb_ios5.sh
irb(main):001:0> interpolate "pan", :start => "imageView index:2", :end => "imageView index:0"=> ["<UIImageView: 0x6e9be00; frame = (10 90; 100 100); alpha = 0.9; opaque = NO; autoresize = W+H; layer = <CALayer: 0x6e9caa0>> - YellowSquare.png"]
irb(main):002:0>

It also supports offsets on end and start, via :offset_start => {:x => 10, :y => 10}, :offset_end => {:x => 100, :y => 0}

Screencast.

http://screencast.com/t/P7mg1QJkox

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment