-
Notifications
You must be signed in to change notification settings - Fork 11
Bash cache & UIPasteBoard
tests updates
#686
Conversation
8e024f5
to
dce86f2
Compare
See discussion at #696
This new version has an improved Ruby Bundler management.
dce86f2
to
0bb055d
Compare
UIPasteBoard
tests updates
// FIXME: We'll need to find a way to make the test work the new pasteboard rules | ||
// | ||
// See: | ||
// - https://developer.apple.com/forums/thread/713770 | ||
// - https://sarunw.com/posts/uipasteboard-privacy-change-ios16/ | ||
// - https://github.com/wordpress-mobile/WordPressAuthenticator-iOS/issues/696 | ||
XCTExpectFailure("Paste board access has changed in iOS 16 and this test is now failing") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if we happen to run the Unit Tests using an iPhone Simulator that runs iOS 15.4 or older? Shouldn't we guard this against the iOS runtime version?
Probably with something like this:
// FIXME: We'll need to find a way to make the test work the new pasteboard rules | |
// | |
// See: | |
// - https://developer.apple.com/forums/thread/713770 | |
// - https://sarunw.com/posts/uipasteboard-privacy-change-ios16/ | |
// - https://github.com/wordpress-mobile/WordPressAuthenticator-iOS/issues/696 | |
XCTExpectFailure("Paste board access has changed in iOS 16 and this test is now failing") | |
// FIXME: We'll need to find a way to make the test work the new pasteboard rules | |
// | |
// See: | |
// - https://developer.apple.com/forums/thread/713770 | |
// - https://sarunw.com/posts/uipasteboard-privacy-change-ios16/ | |
// - https://github.com/wordpress-mobile/WordPressAuthenticator-iOS/issues/696 | |
if ProcessInfo.processInfo.isOperatingSystemAtLeast(.init(majorVersion: 16, minorVersion: 0, patchVersion: 0)) { | |
XCTExpectFailure("Pasteboard access has changed in iOS 16 and this test is now failing") | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat technique.
But do we really need it? Yes, the tests will fail on iOS < 16, but how much of a concern is that for us? What are the chances we'll need to run the tests in iOS < 16?
Thinking about it, it might be beneficial if the UIPasteboard
changes are such that we'll need different code between iOS < 16 and >= 16. 🤔 I haven't looked at that yet, this might be a good time to do so.
As of 2025/02/06 this repo is a public archive and no longer under develpoment. Closing this PR. Looks like neither WordPress/Jetpack nor WooCommerce have developed the tests further. It might be good to revisit this and see if it would beneficial to port over to those apps. Tracked in https://github.com/Automattic/apps-infra-plans/issues/169 |
This PR started as one to upgrade the project to build using the
xcode-14
image in CI. However I didn't iterate on it fast enough and other PRs (#695, #699) did most of the work. So, this PR now only tracks minor improvements.