Skip to main content
Version: Current (v7.0.0-beta.3)

RichDescription and RichHelp no longer carry test ids

Detect​

  • RichDescription.TEST_IDS or RichHelp.TEST_IDS in 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 for RichHelp.

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_IDS from RichDescription or RichHelp.
  • Tests that find markdown output register MarkdownTemplate from @rjsf/core/markdown on the form.

Also read: