Skip to content
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

UIPanGestureRecognizer velocity test cases #639

Merged
merged 1 commit into from Apr 30, 2015

Conversation

kdlogen
Copy link

@kdlogen kdlogen commented Apr 30, 2015

I implemented 4 new test cases for testing the UIPangestureRecognizer`s velocity value.

@phatmann
Copy link
Contributor

I always like to have more tests, thanks!

phatmann added a commit that referenced this pull request Apr 30, 2015
UIPanGestureRecognizer velocity test cases
@phatmann phatmann merged commit f05f095 into kif-framework:master Apr 30, 2015
@kdlogen
Copy link
Author

kdlogen commented Apr 30, 2015

Your welcome! ;)

We wanted to mention that the tests didn't work if we requested the UILabel with method waitForViewWithAccessibilityLabel: (we used waitForTappableViewWithAccessibilityLabel:). As we noticed this behaviour happens because somehow the gesture recognizer can't initialize everything before the test case starts. If you make an extra wait with CFRunLoopRunInMode (~0.1 sec!?) method call before sending every touch event that will work with waitForViewWithAccessibilityLabel:(UIView+KIFAdditions.h - dragPointsAlongPaths: method).

p.s.: You can try it by running only one older swipe test case. The test case should fail!

Does it have any sense? What do you think about it?

@phatmann
Copy link
Contributor

@kdlogen, I do not understand the issue you mention above. Why would the gesture recognizer prevent waitForViewWithAccessibilityLabel: from working? Did you mean to say that waitForTappableViewWithAccessibilityLabel: was failing?

@kdlogen
Copy link
Author

kdlogen commented Jun 8, 2015

If you run a single test case (for example GestureTests.m -> testSwipingLeft) then that fails. You can try out waiting for view with method [tester waitForViewWithAccessibilityLabel:@"Swipe Me"]; but that isn't enough, you should use [tester waitForTappableViewWithAccessibilityLabel:@"Swipe Me"]; method.
I don't know exactly what is the main difference between those methods, but it seams the system can`t initialize the gesture recognizers before swiping on the view.

You can find a solution in pull request #669.

@phatmann
Copy link
Contributor

phatmann commented Jun 8, 2015

@kdlogen Thanks for the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants