-
Notifications
You must be signed in to change notification settings - Fork 12
[SDL-0255] Enhance BodyInformation vehicle data #354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SDL-0255] Enhance BodyInformation vehicle data #354
Conversation
|
@santhanamk the PR is ready for Ford review. |
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.
Hi @ymalovanyi I reviewed this PR. I have a few suggestions on the unit tests. Please see if anything needs to be changed.
| ]; | ||
|
|
||
| const JSON_DOORSTATUS = Test.JSON_DOORSTATUS = { | ||
| [DoorStatus.KEY_LOCATION]: Test.JSON_GRID, |
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.
@ymalovanyi On line 442 does Test.JSON_GRID need to be changed to Test.GENERAL_GRID?
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.
No, because then test will fall, as Grid is a struct. Similarly, as in JSON_WINDOWSTATUS, we have Test.JSON_GRID.
| ]; | ||
|
|
||
| const JSON_GATESTATUS = Test.JSON_GATESTATUS = { | ||
| [GateStatus.KEY_LOCATION]: Test.JSON_GRID, |
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.
@ymalovanyi On line 459 does Test.JSON_GRID need to be changed to Test.GENERAL_GRID?
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.
Same as in above comment.
| [BodyInformation.KEY_PASSENGER_DOOR_AJAR]: Test.GENERAL_BOOLEAN, | ||
| [BodyInformation.KEY_REAR_LEFT_DOOR_AJAR]: Test.GENERAL_BOOLEAN, | ||
| [BodyInformation.KEY_REAR_RIGHT_DOOR_AJAR]: Test.GENERAL_BOOLEAN, | ||
| [BodyInformation.KEY_DOOR_STATUSES]: Test.JSON_DOORSTATUS_LIST, |
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.
@ymalovanyi on line 33 does Test.JSON_DOORSTATUS_LIST need to be changed to Test.GENERAL_DOORSTATUS_LIST?
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.
No, because then test will fall, as DoorStatus is a struct. That is why we need to use list of JSON's.
| [BodyInformation.KEY_REAR_LEFT_DOOR_AJAR]: Test.GENERAL_BOOLEAN, | ||
| [BodyInformation.KEY_REAR_RIGHT_DOOR_AJAR]: Test.GENERAL_BOOLEAN, | ||
| [BodyInformation.KEY_DOOR_STATUSES]: Test.JSON_DOORSTATUS_LIST, | ||
| [BodyInformation.KEY_GATE_STATUSES]: Test.JSON_GATESTATUS_LIST, |
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.
@ymalovanyi on line 34 does Test.JSON_GATESTATUS_LIST need to be changed to Test.GENERAL_GATESTATUS_LIST?
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.
Same as in comment above, GateStatus is a struct.
| [BodyInformation.KEY_REAR_RIGHT_DOOR_AJAR]: Test.GENERAL_BOOLEAN, | ||
| [BodyInformation.KEY_DOOR_STATUSES]: Test.JSON_DOORSTATUS_LIST, | ||
| [BodyInformation.KEY_GATE_STATUSES]: Test.JSON_GATESTATUS_LIST, | ||
| [BodyInformation.KEY_ROOF_STATUSES]: Test.JSON_ROOFSTATUS_LIST, |
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.
@ymalovanyi on line 35 does Test.JSON_ROOFSTATUS_LIST need to be changed to Test.GENERAL_ROOFSTATUS_LIST?
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.
Same as in comment above, RoofStatus is a struct.
|
|
||
| this.getExpectedParameters = function (sdlVersion) { | ||
| return { | ||
| [DoorStatus.KEY_LOCATION]: Test.JSON_GRID, |
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.
@ymalovanyi on line 18 does Test.JSON_GRID need to be changed to Test.GENERAL_GRID?
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.
No, because then test will fail. We're checking for parameters here, and Grid is a struct. That is why we are passing JSON parameters of the struct, but not the whole struct itself.
|
|
||
| this.getExpectedParameters = function (sdlVersion) { | ||
| return { | ||
| [GateStatus.KEY_LOCATION]: Test.JSON_GRID, |
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.
@ymalovanyi On line 18 does Test.JSON_GRID need to be changed to Test.GENERAL_GRID?
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.
Same as in above comment.
|
|
||
| this.getExpectedParameters = function (sdlVersion) { | ||
| return { | ||
| [RoofStatus.KEY_LOCATION]: Test.JSON_GRID, |
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.
@ymalovanyi On line 19 does Test.JSON_GRID need to be changed to Test.GENERAL_GRID?
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.
Same as in above comment.
| return { | ||
| [RoofStatus.KEY_LOCATION]: Test.JSON_GRID, | ||
| [RoofStatus.KEY_STATUS]: Test.GENERAL_DOORSTATUSTYPE, | ||
| [RoofStatus.KEY_STATE]: Test.JSON_WINDOW_STATE, |
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.
@ymalovanyi On line 21 does Test.JSON_WINDOW_STATE need to be changed to Test.GENERAL_WINDOW_STATE?
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.
No, because WindowState is a struct.
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.
@ymalovanyi thank you for the clarification. I am approving this PR.
|
@santhanamk, thank you for the approval! @crokita, Ford approved this PR, please review. |
|
Hi @ymalovanyi and @santhanamk, since the core PR for this feature is not complete, it seems that this PR would have not been tested fully. To ensure the review process goes smoothly:
Once this PR is fully tested, tag me and Livio will review. Thank you! |
|
@jordynmackool @crokita the description was fixed to include all sections from the template and the code was tested against the Core and HMI (corresponded links also included in the description). Please review. |
…nhance-BodyInformation-vehicle-data # Conflicts: # tests/Test.js
|
@crokita, the PR was updated with the latest |
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.
This PR is approved. Waiting on smartdevicelink/rpc_spec#297 to be approved before merging.
Fixes #338
Risk
This PR makes minor API changes.
Testing Plan
Unit Tests
Added unit tests cover [SDL-0255] Enhance BodyInformation vehicle data changes
Core Tests
DoorStatuscan be received from HMIDoorStatusTypecan be received from HMIGateStatuscan be received from HMIRoofStatuscan be received from HMIdoorStatuses,gateStatuses,roofStatusesproperties are present inBodyInformationstructGetVehicleDataresponse message containsbodyInformationparameter withdoorStatuses,gateStatuses,roofStatusespropertiesCore version / branch / commit hash / module tested against: smartdevicelink/sdl_core#3584
HMI name / version / branch / commit hash / module tested against: smartdevicelink/sdl_hmi#466
Summary
Applied [SDL-0255] Enhance BodyInformation vehicle data changes
Changelog
Breaking Changes
N/AEnhancements
DoorStatus,GateStatus,RoofStatusDoorStatusTypeBug Fixes
N/ATasks Remaining:
N/ACLA