-
Story
-
Resolution: Unresolved
-
Normal
-
None
-
None
Story
As a plugin developer I want use the translationApi as a mock solution, similar to other mocks from @backstage/test-utils.
This should simplify and streamline the unit test effort of plugins. It should allow us to use it like this:
<TestApiProvider
apis={[
[translationApiRef, mockApis.translation({ resources: [thisPluginMessages] })],
]}
>
Background
- https://github.com/redhat-developer/rhdh-plugins/blob/main/workspaces/adoption-insights/plugins/adoption-insights/src/components/CatalogEntities/__tests__/CatalogEntities.test.tsx#L22-L36
#https://github.com/redhat-developer/rhdh-plugins/blob/main/workspaces/lightspeed/plugins/lightspeed/src/components/__tests__/LightspeedChat.test.tsx#L104-L124
Dependencies and Blockers
- No QE impact but helps with unit tests.
- No docs impact
Acceptance Criteria
- Upstream contribution might require additional unit tests and documentation
- TranslationApi mock might need some configuration like resources.
- clones
-
RHIDP-9551 Upstream: Add mockApis support for appLanguageApi to @backstage/test-utils
-
- To Do
-