@@ -100,83 +100,6 @@ void main() {
100100 expect (await xcode.findBestAvailableIphoneSimulator (), expectedDeviceId);
101101 });
102102
103- test ('skips unavailable devices' , () async {
104- const String expectedDeviceId = '2706BBEB-1E01-403E-A8E9-70E8E5A24774' ;
105- // Note: This uses `dynamic` deliberately, and should not be updated to
106- // Object, in order to ensure that the code correctly handles this return
107- // type from JSON decoding.
108- final Map <String , dynamic > devices = < String , dynamic > {
109- 'runtimes' : < Map <String , dynamic >> [
110- < String , dynamic > {
111- 'bundlePath' :
112- '/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.0.simruntime' ,
113- 'buildversion' : '17A577' ,
114- 'runtimeRoot' :
115- '/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.0.simruntime/Contents/Resources/RuntimeRoot' ,
116- 'identifier' : 'com.apple.CoreSimulator.SimRuntime.iOS-13-0' ,
117- 'version' : '13.0' ,
118- 'isAvailable' : true ,
119- 'name' : 'iOS 13.0'
120- },
121- < String , dynamic > {
122- 'bundlePath' :
123- '/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.4.simruntime' ,
124- 'buildversion' : '17L255' ,
125- 'runtimeRoot' :
126- '/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.4.simruntime/Contents/Resources/RuntimeRoot' ,
127- 'identifier' : 'com.apple.CoreSimulator.SimRuntime.iOS-13-4' ,
128- 'version' : '13.4' ,
129- 'isAvailable' : true ,
130- 'name' : 'iOS 13.4'
131- },
132- < String , dynamic > {
133- 'bundlePath' :
134- '/Applications/Xcode_11_7.app/Contents/Developer/Platforms/WatchOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/watchOS.simruntime' ,
135- 'buildversion' : '17T531' ,
136- 'runtimeRoot' :
137- '/Applications/Xcode_11_7.app/Contents/Developer/Platforms/WatchOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/watchOS.simruntime/Contents/Resources/RuntimeRoot' ,
138- 'identifier' : 'com.apple.CoreSimulator.SimRuntime.watchOS-6-2' ,
139- 'version' : '6.2.1' ,
140- 'isAvailable' : true ,
141- 'name' : 'watchOS 6.2'
142- }
143- ],
144- 'devices' : < String , dynamic > {
145- 'com.apple.CoreSimulator.SimRuntime.iOS-13-4' : < Map <String , dynamic >> [
146- < String , dynamic > {
147- 'dataPath' :
148- '/Users/xxx/Library/Developer/CoreSimulator/Devices/2706BBEB-1E01-403E-A8E9-70E8E5A24774/data' ,
149- 'logPath' :
150- '/Users/xxx/Library/Logs/CoreSimulator/2706BBEB-1E01-403E-A8E9-70E8E5A24774' ,
151- 'udid' : expectedDeviceId,
152- 'isAvailable' : true ,
153- 'deviceTypeIdentifier' :
154- 'com.apple.CoreSimulator.SimDeviceType.iPhone-8' ,
155- 'state' : 'Shutdown' ,
156- 'name' : 'iPhone 8'
157- },
158- < String , dynamic > {
159- 'dataPath' :
160- '/Users/xxx/Library/Developer/CoreSimulator/Devices/1E76A0FD-38AC-4537-A989-EA639D7D012A/data' ,
161- 'logPath' :
162- '/Users/xxx/Library/Logs/CoreSimulator/1E76A0FD-38AC-4537-A989-EA639D7D012A' ,
163- 'udid' : '1E76A0FD-38AC-4537-A989-EA639D7D012A' ,
164- 'isAvailable' : false ,
165- 'deviceTypeIdentifier' :
166- 'com.apple.CoreSimulator.SimDeviceType.iPhone-8-Plus' ,
167- 'state' : 'Shutdown' ,
168- 'name' : 'iPhone 8 Plus'
169- }
170- ]
171- }
172- };
173-
174- processRunner.processToReturn = MockProcess .succeeding ();
175- processRunner.resultStdout = jsonEncode (devices);
176-
177- expect (await xcode.findBestAvailableIphoneSimulator (), expectedDeviceId);
178- });
179-
180103 test ('ignores non-iOS runtimes' , () async {
181104 // Note: This uses `dynamic` deliberately, and should not be updated to
182105 // Object, in order to ensure that the code correctly handles this return
@@ -204,7 +127,7 @@ void main() {
204127 'logPath' :
205128 '/Users/xxx/Library/Logs/CoreSimulator/1E76A0FD-38AC-4537-A989-EA639D7D012A' ,
206129 'udid' : '1E76A0FD-38AC-4537-A989-EA639D7D012A' ,
207- 'isAvailable' : false ,
130+ 'isAvailable' : true ,
208131 'deviceTypeIdentifier' :
209132 'com.apple.CoreSimulator.SimDeviceType.Apple-Watch-38mm' ,
210133 'state' : 'Shutdown' ,
0 commit comments