This repository was archived by the owner on Feb 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[ci][image_picker]enable xcode 12/iOS 14 for all tasks except lint #3304
Merged
Merged
Changes from all commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
12551e3
xcode 12 for tasks
64f2b50
update waiting time
28f9f7b
update test
f4c949a
try fix image picker test
de0286a
remove unnecessary tasks
bd0200a
try fix image picker test again
927d250
try fix again
37616e7
try xcode 12.2
f5b9269
xcode 12.1
e1d8df4
ios 14.2 simulator
2254685
simulator 14.2
d84c950
fix image picker test
75613a1
enable share
0b7c246
try xcode 12.1.1
4754aeb
try xcode 12.2
e90ed2c
rest to xcode 12.1
30ef592
draft
bee2c20
merge master
f7c4701
ios 14.1
5f71bca
xcode 12.0
bca25b5
xcode 12.1
9ab3345
14.2
62617e0
test run on 14.2
882cdd2
merge master
2c45fc2
12.0
04d3c38
iphone x
9732873
big sur
9bc4125
fix image name
b386dd6
fixed simulator version
16d163b
skip drive for testing
244ed61
try experimental
c916911
add log to xctest
e4ccde2
test picking image first
41eace9
tap self to ensure popup
0a00532
try separate tests
72f96af
fix capturing strong reference
f690f2d
add teardown to terminate the app
5c7a769
remove experimental flag
580af84
uncommment tasks
d31e430
review
f26127b
typo
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ @interface ImagePickerFromGalleryUITests : XCTestCase | |
@implementation ImagePickerFromGalleryUITests | ||
|
||
- (void)setUp { | ||
[super setUp]; | ||
// Delete the app if already exists, to test permission popups | ||
|
||
self.continueAfterFailure = NO; | ||
|
@@ -31,7 +32,7 @@ - (void)setUp { | |
if (![allPhotoPermission waitForExistenceWithTimeout: | ||
kElementWaitingTime]) { | ||
os_log_error(OS_LOG_DEFAULT, "%@", | ||
self.app.debugDescription); | ||
weakSelf.app.debugDescription); | ||
XCTFail(@"Failed due to not able to find " | ||
@"allPhotoPermission button with %@ seconds", | ||
@(kElementWaitingTime)); | ||
|
@@ -42,7 +43,7 @@ - (void)setUp { | |
if (![ok waitForExistenceWithTimeout: | ||
kElementWaitingTime]) { | ||
os_log_error(OS_LOG_DEFAULT, "%@", | ||
self.app.debugDescription); | ||
weakSelf.app.debugDescription); | ||
XCTFail(@"Failed due to not able to find ok button " | ||
@"with %@ seconds", | ||
@(kElementWaitingTime)); | ||
|
@@ -53,11 +54,19 @@ - (void)setUp { | |
}]; | ||
} | ||
|
||
- (void)tearDown { | ||
[super tearDown]; | ||
[self.app terminate]; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. -[super testDown]; |
||
} | ||
|
||
- (void)testPickingFromGallery { | ||
[self launchPickerAndCancel]; | ||
[self launchPickerAndPick]; | ||
} | ||
|
||
- (void)testCancel { | ||
[self launchPickerAndCancel]; | ||
} | ||
|
||
- (void)launchPickerAndCancel { | ||
// Find and tap on the pick from gallery button. | ||
NSPredicate* predicateToFindImageFromGalleryButton = | ||
|
@@ -160,6 +169,10 @@ - (void)launchPickerAndPick { | |
XCTAssertTrue(pickButton.exists); | ||
[pickButton tap]; | ||
|
||
// There is a known bug where the permission popups interruption won't get fired until a tap | ||
// happened in the app. We expect a permission popup so we do a tap here. | ||
[self.app tap]; | ||
|
||
// Find an image and tap on it. (IOS 14 UI, images are showing directly) | ||
XCUIElement* aImage; | ||
if (@available(iOS 14, *)) { | ||
|
@@ -177,6 +190,7 @@ - (void)launchPickerAndPick { | |
identifier:@"PhotosGridView"] | ||
.cells.firstMatch; | ||
} | ||
os_log_error(OS_LOG_DEFAULT, "description before picking image %@", self.app.debugDescription); | ||
if (![aImage waitForExistenceWithTimeout:kElementWaitingTime]) { | ||
os_log_error(OS_LOG_DEFAULT, "%@", self.app.debugDescription); | ||
XCTFail(@"Failed due to not able to find an image with %@ seconds", @(kElementWaitingTime)); | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Should we keep this to keep CocoaPods up to date?