Skip to content

Commit 2c58077

Browse files
Chris YangFerry Spiering
Chris Yang
authored and
Ferry Spiering
committed
[image_picker] Set up XCUITests (flutter#3254)
1 parent b26a423 commit 2c58077

File tree

7 files changed

+345
-13
lines changed

7 files changed

+345
-13
lines changed

.cirrus.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ task:
163163
- name: build-ipas+drive-examples
164164
env:
165165
PATH: $PATH:/usr/local/bin
166-
PLUGINS_TO_SKIP_XCTESTS: "battery/battery,camera,connectivity/connectivity,device_info/device_info,espresso,google_maps_flutter/google_maps_flutter,google_sign_in/google_sign_in,image_picker/image_picker,in_app_purchase,integration_test,ios_platform_images,local_auth,package_info,path_provider/path_provider,quick_actions,sensors,shared_preferences/shared_preferences,url_launcher/url_launcher,video_player/video_player,webview_flutter,wifi_info_flutter/wifi_info_flutter"
166+
PLUGINS_TO_SKIP_XCTESTS: "battery/battery,camera,connectivity/connectivity,device_info/device_info,espresso,google_maps_flutter/google_maps_flutter,google_sign_in/google_sign_in,in_app_purchase,integration_test,ios_platform_images,local_auth,package_info,path_provider/path_provider,quick_actions,sensors,shared_preferences/shared_preferences,url_launcher/url_launcher,video_player/video_player,webview_flutter,wifi_info_flutter/wifi_info_flutter"
167167
matrix:
168168
PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4"
169169
PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4"

packages/image_picker/image_picker/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.6.7+14
2+
3+
* Set up XCUITests.
4+
15
## 0.6.7+13
26

37
* Update documentation of `getImage()` about HEIC images.

packages/image_picker/image_picker/example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 129 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
680049272280D79A006DD6AB /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
1414
680049382280F2B9006DD6AB /* pngImage.png in Resources */ = {isa = PBXBuildFile; fileRef = 680049352280F2B8006DD6AB /* pngImage.png */; };
1515
680049392280F2B9006DD6AB /* jpgImage.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 680049362280F2B8006DD6AB /* jpgImage.jpg */; };
16+
6801C8392555D726009DAF8D /* ImagePickerFromGalleryUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6801C8382555D726009DAF8D /* ImagePickerFromGalleryUITests.m */; };
1617
68B9AF72243E4B3F00927CE4 /* ImagePickerPluginTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 68B9AF71243E4B3F00927CE4 /* ImagePickerPluginTests.m */; };
1718
68F4B464228B3AB500C25614 /* PhotoAssetUtilTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 68F4B463228B3AB500C25614 /* PhotoAssetUtilTests.m */; };
1819
978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
@@ -34,6 +35,13 @@
3435
remoteGlobalIDString = 97C146ED1CF9000F007C117D;
3536
remoteInfo = Runner;
3637
};
38+
6801C83B2555D726009DAF8D /* PBXContainerItemProxy */ = {
39+
isa = PBXContainerItemProxy;
40+
containerPortal = 97C146E61CF9000F007C117D /* Project object */;
41+
proxyType = 1;
42+
remoteGlobalIDString = 97C146ED1CF9000F007C117D;
43+
remoteInfo = Runner;
44+
};
3745
/* End PBXContainerItemProxy section */
3846

3947
/* Begin PBXCopyFilesBuildPhase section */
@@ -60,6 +68,9 @@
6068
680049352280F2B8006DD6AB /* pngImage.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = pngImage.png; sourceTree = "<group>"; };
6169
680049362280F2B8006DD6AB /* jpgImage.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = jpgImage.jpg; sourceTree = "<group>"; };
6270
6801632E632668F4349764C9 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
71+
6801C8362555D726009DAF8D /* RunnerUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
72+
6801C8382555D726009DAF8D /* ImagePickerFromGalleryUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ImagePickerFromGalleryUITests.m; sourceTree = "<group>"; };
73+
6801C83A2555D726009DAF8D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
6374
68B9AF71243E4B3F00927CE4 /* ImagePickerPluginTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ImagePickerPluginTests.m; path = ../../../ios/Tests/ImagePickerPluginTests.m; sourceTree = "<group>"; };
6475
68F4B463228B3AB500C25614 /* PhotoAssetUtilTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = PhotoAssetUtilTests.m; path = ../../../ios/Tests/PhotoAssetUtilTests.m; sourceTree = "<group>"; };
6576
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
@@ -88,6 +99,13 @@
8899
);
89100
runOnlyForDeploymentPostprocessing = 0;
90101
};
102+
6801C8332555D726009DAF8D /* Frameworks */ = {
103+
isa = PBXFrameworksBuildPhase;
104+
buildActionMask = 2147483647;
105+
files = (
106+
);
107+
runOnlyForDeploymentPostprocessing = 0;
108+
};
91109
97C146EB1CF9000F007C117D /* Frameworks */ = {
92110
isa = PBXFrameworksBuildPhase;
93111
buildActionMask = 2147483647;
@@ -123,6 +141,15 @@
123141
path = TestImages;
124142
sourceTree = "<group>";
125143
};
144+
6801C8372555D726009DAF8D /* RunnerUITests */ = {
145+
isa = PBXGroup;
146+
children = (
147+
6801C8382555D726009DAF8D /* ImagePickerFromGalleryUITests.m */,
148+
6801C83A2555D726009DAF8D /* Info.plist */,
149+
);
150+
path = RunnerUITests;
151+
sourceTree = "<group>";
152+
};
126153
840012C8B5EDBCF56B0E4AC1 /* Pods */ = {
127154
isa = PBXGroup;
128155
children = (
@@ -150,6 +177,7 @@
150177
9740EEB11CF90186004384FC /* Flutter */,
151178
97C146F01CF9000F007C117D /* Runner */,
152179
680049182280D368006DD6AB /* image_picker_exampleTests */,
180+
6801C8372555D726009DAF8D /* RunnerUITests */,
153181
97C146EF1CF9000F007C117D /* Products */,
154182
840012C8B5EDBCF56B0E4AC1 /* Pods */,
155183
CF3B75C9A7D2FA2A4C99F110 /* Frameworks */,
@@ -161,6 +189,7 @@
161189
children = (
162190
97C146EE1CF9000F007C117D /* Runner.app */,
163191
680049172280D368006DD6AB /* image_picker_exampleTests.xctest */,
192+
6801C8362555D726009DAF8D /* RunnerUITests.xctest */,
164193
);
165194
name = Products;
166195
sourceTree = "<group>";
@@ -218,6 +247,24 @@
218247
productReference = 680049172280D368006DD6AB /* image_picker_exampleTests.xctest */;
219248
productType = "com.apple.product-type.bundle.unit-test";
220249
};
250+
6801C8352555D726009DAF8D /* RunnerUITests */ = {
251+
isa = PBXNativeTarget;
252+
buildConfigurationList = 6801C83F2555D726009DAF8D /* Build configuration list for PBXNativeTarget "RunnerUITests" */;
253+
buildPhases = (
254+
6801C8322555D726009DAF8D /* Sources */,
255+
6801C8332555D726009DAF8D /* Frameworks */,
256+
6801C8342555D726009DAF8D /* Resources */,
257+
);
258+
buildRules = (
259+
);
260+
dependencies = (
261+
6801C83C2555D726009DAF8D /* PBXTargetDependency */,
262+
);
263+
name = RunnerUITests;
264+
productName = RunnerUITests;
265+
productReference = 6801C8362555D726009DAF8D /* RunnerUITests.xctest */;
266+
productType = "com.apple.product-type.bundle.ui-testing";
267+
};
221268
97C146ED1CF9000F007C117D /* Runner */ = {
222269
isa = PBXNativeTarget;
223270
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
@@ -255,6 +302,11 @@
255302
ProvisioningStyle = Automatic;
256303
TestTargetID = 97C146ED1CF9000F007C117D;
257304
};
305+
6801C8352555D726009DAF8D = {
306+
CreatedOnToolsVersion = 11.7;
307+
ProvisioningStyle = Automatic;
308+
TestTargetID = 97C146ED1CF9000F007C117D;
309+
};
258310
97C146ED1CF9000F007C117D = {
259311
CreatedOnToolsVersion = 7.3.1;
260312
SystemCapabilities = {
@@ -280,6 +332,7 @@
280332
targets = (
281333
97C146ED1CF9000F007C117D /* Runner */,
282334
680049162280D368006DD6AB /* image_picker_exampleTests */,
335+
6801C8352555D726009DAF8D /* RunnerUITests */,
283336
);
284337
};
285338
/* End PBXProject section */
@@ -296,6 +349,13 @@
296349
);
297350
runOnlyForDeploymentPostprocessing = 0;
298351
};
352+
6801C8342555D726009DAF8D /* Resources */ = {
353+
isa = PBXResourcesBuildPhase;
354+
buildActionMask = 2147483647;
355+
files = (
356+
);
357+
runOnlyForDeploymentPostprocessing = 0;
358+
};
299359
97C146EC1CF9000F007C117D /* Resources */ = {
300360
isa = PBXResourcesBuildPhase;
301361
buildActionMask = 2147483647;
@@ -389,6 +449,14 @@
389449
);
390450
runOnlyForDeploymentPostprocessing = 0;
391451
};
452+
6801C8322555D726009DAF8D /* Sources */ = {
453+
isa = PBXSourcesBuildPhase;
454+
buildActionMask = 2147483647;
455+
files = (
456+
6801C8392555D726009DAF8D /* ImagePickerFromGalleryUITests.m in Sources */,
457+
);
458+
runOnlyForDeploymentPostprocessing = 0;
459+
};
392460
97C146EA1CF9000F007C117D /* Sources */ = {
393461
isa = PBXSourcesBuildPhase;
394462
buildActionMask = 2147483647;
@@ -407,6 +475,11 @@
407475
target = 97C146ED1CF9000F007C117D /* Runner */;
408476
targetProxy = 6800491C2280D368006DD6AB /* PBXContainerItemProxy */;
409477
};
478+
6801C83C2555D726009DAF8D /* PBXTargetDependency */ = {
479+
isa = PBXTargetDependency;
480+
target = 97C146ED1CF9000F007C117D /* Runner */;
481+
targetProxy = 6801C83B2555D726009DAF8D /* PBXContainerItemProxy */;
482+
};
410483
/* End PBXTargetDependency section */
411484

412485
/* Begin PBXVariantGroup section */
@@ -480,9 +553,55 @@
480553
};
481554
name = Release;
482555
};
556+
6801C83D2555D726009DAF8D /* Debug */ = {
557+
isa = XCBuildConfiguration;
558+
buildSettings = {
559+
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
560+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
561+
CLANG_ENABLE_OBJC_WEAK = YES;
562+
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
563+
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
564+
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
565+
CODE_SIGN_STYLE = Automatic;
566+
DEVELOPMENT_TEAM = "";
567+
GCC_C_LANGUAGE_STANDARD = gnu11;
568+
INFOPLIST_FILE = RunnerUITests/Info.plist;
569+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
570+
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
571+
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
572+
MTL_FAST_MATH = YES;
573+
PRODUCT_BUNDLE_IDENTIFIER = com.google.RunnerUITests;
574+
PRODUCT_NAME = "$(TARGET_NAME)";
575+
TARGETED_DEVICE_FAMILY = "1,2";
576+
TEST_TARGET_NAME = Runner;
577+
};
578+
name = Debug;
579+
};
580+
6801C83E2555D726009DAF8D /* Release */ = {
581+
isa = XCBuildConfiguration;
582+
buildSettings = {
583+
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
584+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
585+
CLANG_ENABLE_OBJC_WEAK = YES;
586+
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
587+
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
588+
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
589+
CODE_SIGN_STYLE = Automatic;
590+
DEVELOPMENT_TEAM = "";
591+
GCC_C_LANGUAGE_STANDARD = gnu11;
592+
INFOPLIST_FILE = RunnerUITests/Info.plist;
593+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
594+
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
595+
MTL_FAST_MATH = YES;
596+
PRODUCT_BUNDLE_IDENTIFIER = com.google.RunnerUITests;
597+
PRODUCT_NAME = "$(TARGET_NAME)";
598+
TARGETED_DEVICE_FAMILY = "1,2";
599+
TEST_TARGET_NAME = Runner;
600+
};
601+
name = Release;
602+
};
483603
97C147031CF9000F007C117D /* Debug */ = {
484604
isa = XCBuildConfiguration;
485-
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
486605
buildSettings = {
487606
ALWAYS_SEARCH_USER_PATHS = NO;
488607
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
@@ -539,7 +658,6 @@
539658
};
540659
97C147041CF9000F007C117D /* Release */ = {
541660
isa = XCBuildConfiguration;
542-
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
543661
buildSettings = {
544662
ALWAYS_SEARCH_USER_PATHS = NO;
545663
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
@@ -644,6 +762,15 @@
644762
defaultConfigurationIsVisible = 0;
645763
defaultConfigurationName = Release;
646764
};
765+
6801C83F2555D726009DAF8D /* Build configuration list for PBXNativeTarget "RunnerUITests" */ = {
766+
isa = XCConfigurationList;
767+
buildConfigurations = (
768+
6801C83D2555D726009DAF8D /* Debug */,
769+
6801C83E2555D726009DAF8D /* Release */,
770+
);
771+
defaultConfigurationIsVisible = 0;
772+
defaultConfigurationName = Release;
773+
};
647774
97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
648775
isa = XCConfigurationList;
649776
buildConfigurations = (

0 commit comments

Comments
 (0)