kif-framework / KIF

Keep It Functional - An iOS Functional Testing Framework
Other
6.2k stars 911 forks source link

`swipeRowAtIndexPath:inTableView:inDirection:` not working on iOS 14 #1221

Open billburgess opened 3 years ago

billburgess commented 3 years ago

When testing the table view swipe action on iOS 14 (Phone Devices only) [tester swipeRowAtIndexPath:cellPath inTableView:tableView inDirection:KIFSwipeDirectionLeft]; is not working. When testing on iPad, the swipe action completely triggers the action due to pulling it all the way over. On phone devices, the action only pulls over partially and to trigger the action, you need to tap the button. This is how this has worked on all previous versions of iOS. On iOS 14 the swipe action seems to quit early and the delete button doesn't show. Something looks like it is scrolling the tableview and cancelling the swipe action.

Testing using Xcode 12.4 iPad Pro iOS 14.4 & 13.7 (works by triggering the entire action) iPhone 12 iOS 14.4 & 13.7 (swipe action gets cancelled)

The problem seems to be related to using "ludicrous speed". Or not using it. If setting it to less than 100, it fails. It seems to work when set to 100. UIApplication.sharedApplication.keyWindow.layer.speed = 100;

The inverse seems to also be true. When running on older runtimes, the iPad tests fail and the phone works fine. Xcode 12.4 iPad Air 2 iOS 11.4 (fails) iPhone 8 iOS 11.4 (works fine)

I'm trying to figure out why the action can't be triggered in these scenarios. It is creating issues on CI when we have to run multiple versions of the OS.

dostrander commented 3 years ago

Thanks for flagging this!