theappbusiness / TABTestKit

Library designed to make writing and maintaining automated tests for iOS applications. This includes automation of bio-metrics and controlling of mock servers
MIT License
59 stars 13 forks source link

Add 'waitFor' and deprecate 'await' #152

Closed theblixguy closed 3 years ago

theblixguy commented 3 years ago

This PR deprecates the await API and renames it to waitFor. This is because the await keyword is now reserved for the new concurrency features in Swift 5.5 and calling it freely will lead to compile errors.

These changes are done in a fully backwards-compatible way so older projects can continue using the await API.

Fixes https://github.com/theappbusiness/TABTestKit/issues/151

Pre-merge checklist

Before merging any PR, please check the following common things that should be done beforehand. These aren't all always required, so just check the box if it doesn't apply.

theblixguy commented 3 years ago

Need to fix the formatting!

Neil3079 commented 3 years ago

Yo @theblixguy any update on this thread? iOS 15 is getting pretty close 😬 Need any help on this?

theblixguy commented 3 years ago

@Neil3079 just need to fix some formatting here (and make sure tests pass, seems like some are failing?). Will try to do that shortly!

Neil3079 commented 3 years ago

It looks like the tests are failing because they can't select the right Xcode versions. It looks like more of an issue with the workflows themselves, maybe GitHub no longer support Xcode 10 etc?

theblixguy commented 3 years ago

It looks like the tests are failing because they can't select the right Xcode versions. It looks like more of an issue with the workflows themselves, maybe GitHub no longer support Xcode 10 etc?

Yeah, I could drop unavailable ones and bump some versions up (I saw an error about Xcode 12.1 not being available and I can bump it to 12.5.1). Would be a shame to drop older Xcode though but if it's not available then there's not much I can do I suppose.

theblixguy commented 3 years ago

Looks like Xcode 10.3 doesn't exist on macOS 11 (which is now used for macos-latest) hence why, I changed it to macOS 10.15 for the Xcode 10.3 workflow job. Also updated to use Xcode 12.5.1 and iOS 14.5 (from 12.1 and 14.1 respectively) in the workflow jobs using macOS 11. Let's see if everything passes now!

theblixguy commented 3 years ago

I don't have Xcode 12.5.1 but I have 12.5 and I tested locally on iPhone 12/iOS 14.5 sim and all the tests passed. IDK why they fail on CI on 12.5.1 when there doesn't seem to have been any major changes 🤔 I've tweaked the yml file to use 12.5 instead of 12.5.1, let's see if that makes any difference.

theblixguy commented 3 years ago

Oh wow all tests pass now ✨ Just need to fix the indentation then it's good to merge.

theblixguy commented 3 years ago

I am actually finding it a bit difficult to fix the indentation here (I tried a few combinations of settings but it still doesn't result in the right output). What I am thinking is to merge this as-is (code still looks fine in Xcode, it's just here that it looks a bit off) and then create a new indentation PR to update all the files (seems like it's a mix of different ones due to people different people working on it) and maybe use https://github.com/marketplace/actions/swift-format-lint to enforce correct indentation on future PRs.

Neil3079 commented 3 years ago

@theblixguy I think that makes sense, no point in blocking this release for indentation but would be good to get it sorted properly