@@ -100,83 +100,6 @@ void main() {
100
100
expect (await xcode.findBestAvailableIphoneSimulator (), expectedDeviceId);
101
101
});
102
102
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
-
180
103
test ('ignores non-iOS runtimes' , () async {
181
104
// Note: This uses `dynamic` deliberately, and should not be updated to
182
105
// Object, in order to ensure that the code correctly handles this return
@@ -204,7 +127,7 @@ void main() {
204
127
'logPath' :
205
128
'/Users/xxx/Library/Logs/CoreSimulator/1E76A0FD-38AC-4537-A989-EA639D7D012A' ,
206
129
'udid' : '1E76A0FD-38AC-4537-A989-EA639D7D012A' ,
207
- 'isAvailable' : false ,
130
+ 'isAvailable' : true ,
208
131
'deviceTypeIdentifier' :
209
132
'com.apple.CoreSimulator.SimDeviceType.Apple-Watch-38mm' ,
210
133
'state' : 'Shutdown' ,
0 commit comments