diff --git a/packages/ui-react-utils/src/DeterministicIdContext/DeterministicIdContextProvider.tsx b/packages/ui-react-utils/src/DeterministicIdContext/DeterministicIdContextProvider.tsx
index 813d0fa1cf..bf37f0b3c9 100644
--- a/packages/ui-react-utils/src/DeterministicIdContext/DeterministicIdContextProvider.tsx
+++ b/packages/ui-react-utils/src/DeterministicIdContext/DeterministicIdContextProvider.tsx
@@ -36,6 +36,11 @@ type DeterministicIdProviderProps = React.PropsWithChildren<{
* ---
* category: components/utilities
* ---
+ * WARNING: providing the `instanceCounterMap` prop will result in unexpected behaviour. DO NOT USE IT!
+ *
+ * DEPRECATED: the `instanceCounterMap` prop is deprecated. You don't need to supply the
+ * `instanceCounterMap` to the component. It handles it internally.
+ *
* This is utility component for wrapping components with `DeterministicIdContext.Provider`
* See detailed documentation about how to use it: [InstUISettingsProvider](/#InstUISettingsProvider)
*/
diff --git a/packages/ui-react-utils/src/__tests__/DeterministicIdContext.test.tsx b/packages/ui-react-utils/src/__tests__/DeterministicIdContext.test.tsx
index bb9ead3aef..cfae13ba74 100644
--- a/packages/ui-react-utils/src/__tests__/DeterministicIdContext.test.tsx
+++ b/packages/ui-react-utils/src/__tests__/DeterministicIdContext.test.tsx
@@ -41,15 +41,45 @@ class TestComponent extends React.Component<
}
}
+const uniqueIds = (el: { getDOMNode: () => Element }) => {
+ const idList = Array.from(el.getDOMNode().children).map((el) => el.id)
+
+ return new Set(idList).size === idList.length
+}
+
describe('DeterministicIdContext', () => {
- it('should add id correctly by default', async () => {
- const el = await mount(