This PR aims to ensure that the order of the rich-text linkedItems and linkedItemsCodenames arrays match the order in which the items/components appear in the rich-text value property.
[x] Code follows coding conventions held in this repo
[x] Automated tests have been added
[x] Tests are passing
[ ] Docs have been updated (if applicable) - N/A
[x] Temporary settings (e.g. variables used during development and testing) have been reverted to defaults
How to test
Added unit tests to make sure the order of the modular_content items is fixed in the Rich Text linkedItems and linkedItemsCodenames properties of the resolved items. Testing it with live data can be a bit hit and miss as the Kontent Delivery JS API sometimes matches the order of the items in the rich text and sometimes doesn't. @Enngage Let me know if those tests should be added somewhere else in the repo 😄
Motivation
This PR aims to ensure that the order of the rich-text
linkedItems
andlinkedItemsCodenames
arrays match the order in which the items/components appear in the rich-textvalue
property.See this issue for more details: https://github.com/kontent-ai/delivery-sdk-js/issues/355
Checklist
How to test
Added unit tests to make sure the order of the
modular_content
items is fixed in the Rich TextlinkedItems
andlinkedItemsCodenames
properties of the resolved items. Testing it with live data can be a bit hit and miss as the Kontent Delivery JS API sometimes matches the order of the items in the rich text and sometimes doesn't. @Enngage Let me know if those tests should be added somewhere else in the repo 😄