Skip to content

SystemCapabilityManager should automatically subscribe to capability updates and not save AppServiceCapabilities with duplicate serviceIDs #567

@renonick87

Description

@renonick87

Bug Summary

The SystemCapabilityManager needs to align with the other mobile SDL libraries to automatically subscribe to SystemCapability updates from SDL Core. This ensures that the library will be notified of updates as they happen.
Additionally, if an update for an AppServiceCapability is received by the library with the same ServiceID as an existing capability and if the update doesn't include the ServiceUpdateReason.REMOVED, then it will result in duplicate AppServiceCapability objects being saved. The library should prevent this from happening. There are AppServiceCapability comparison methods that are missing from the library that would resolve this. The methods _updateAppServices and _matchesAppService would be added to the SystemCapabilityManager.

Reproduction Steps

  1. Run SystemCapabilityManager unit tests

Expected Behavior:
The tests for updating an existing AppServiceCapability with the same serviceID will remove the old capability and replace it with the new one.
The tests for handling capability subscriptions successfully subscribe to the required capabilities and can later verify that each capability is subscribed.
The tests mentioned above should pass.

Observed Behavior:
The tests mentioned above fail, AppServiceCapability objects with the same serviceID are allowed to coexist, and the capability updates are not automatically subscribed.

Which projects have you seen this bug on?

No response

JavaScript Version(s)

No response

sdl_javascript Version

1.7.0

Testing Environment(s)

Manticore v2.9.0

Relevant log output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions