RichDescription and RichHelp no longer carry test ids
Detect
RichDescription.TEST_IDSorRichHelp.TEST_IDSin your tests.- Type checker:
Property 'TEST_IDS' does not exist on type '<T = unknown, S extends StrictRJSFSchema = StrictRJSFSchema, F extends FormContextType = object>({ description, registry, uiSchema }: RichDescriptionProps<T, S, F>) => Element'.(TS2339), and the same forRichHelp.
Change
Markdown now renders through the MarkdownTemplate, see Markdown renders only through a registered MarkdownTemplate. The test id lives on that renderer:
-import { RichDescription } from '@rjsf/core';
+import MarkdownTemplate from '@rjsf/core/markdown';
-screen.getByTestId(RichDescription.TEST_IDS.markdown);
+screen.getByTestId(MarkdownTemplate.TEST_IDS.markdown);
Verify
- No test reads
TEST_IDSfromRichDescriptionorRichHelp. - Tests that find markdown output register
MarkdownTemplatefrom@rjsf/core/markdownon the form.
Also read: