kif-framework / KIF

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

Fix ios 16 #1276

Closed BrunoMazzo closed 1 year ago

BrunoMazzo commented 1 year ago

Fix for iOS 16.

I'm not 100% familiar with the code, so I may be missing some context, so please let me know if there is anything I should fix.

BrunoMazzo commented 1 year ago

Thanks for the feedback. I will work on it and push the changes probably in the weekend.

This fix the full suite of tests. I will remove the changes for the async stuff that I forgot (I starting work in the same branch and forgot to clean up), add the CI validation, and do the other changes.

justinseanmartin commented 1 year ago

That's great to hear! It is probably worth bumping the CI config to validate that we don't regress it. That's definitely not a blocker for landing these changes though.

dostrander commented 1 year ago

@BrunoMazzo thanks 🎉 for finding this! So this allows you to use pickers and keyboads in iOS 16??

I was under the impression this was out of process from my debugging in this so was expecting a larger reverse engineering effort to be able to call what XCUITest calls. But if that's not that case that's amazing. Thank you SOOO much for digging into this!

dostrander commented 1 year ago

If you need some help getting it to run on iOS 16 feel free to use anything from here: https://github.com/kif-framework/KIF/pull/1268

I added this a while ago but since the tests weren't passing it didn't make sense to merge

justinseanmartin commented 1 year ago

I'm rerunning the failed jobs to see if the results are consistent or not. I think at this point, supporting only Xcode 13.4.1 (Monterey) & 14.2 (Ventura) seems reasonable to me. Maybe we could do one iPad + iPhone device on each platform? Not changing the device type will help eliminate some variable that might lead other test failures related to screen dimensions and whatnot. WDYT? Just trying to limit how many things we need to chase down here to get this landed.

justinseanmartin commented 1 year ago

It looks like we might need some availability checking for the behavior to be backwards compatible with the iOS 15 (Xcode 13) SDK:

❌  /Users/runner/work/KIF/KIF/Sources/KIF/Classes/KIFSystemTestActor.m:98:26: no visible @interface for 'UIWindowScene' declares the selector 'requestGeometryUpdateWithPreferences:errorHandler:'
BrunoMazzo commented 1 year ago

I added a check to compile on other versions of Xcode and changed the CI to run on iPhone SE and iPad Pro, Xcode 13 and 14.