fix: status of iOS Sim images and Android Emulator images are different #3809
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.
fix: status of iOS Sim images and Android Emulator images are different
Whenever CLI returns information for available emulators/simulators, the returned object for each of the image has a status property.
For Android the status is "Running" or "Not running", for iOS it is "Connected" or "Disconnected".
Unify the status properties - use "Running" and "Not running" for both of the images.
Also, for iOS images, the imageIdentifier property has not been populated - fill it with the value of the identifier property, so the API will be consistent for both Android and iOS.
As the property has not been populated for iOS Simulators, the events "emulatorImageFound" and "emulatorImageLost" were never triggered in case you add new iOS Simulator images. Now this should work correctly.
Fix unit tests on Windows - the split by EOL when parsing the output of avdmanager executable is not working on Windows, as the EOL is
\r\n
, while the avdmanager prints results with\n
only.Also the tests were failing on Windows due to the same reason - test case has
\n
, while split is by\r\n
.Use some constants in the tests instead of strings for status property.
docs: update changelog for 4.2.1
Update the CHANGELOG for 4.2.1
PR Checklist
What is the current behavior?
When using CLI as a library and call
tns.devicesService.getEmulatorImages
on macOS, the status properties of iOS and Android images are not consistent.What is the new behavior?
Status are the same for iOS and Android