Skip to main content
Glama
ElementsInput.test.tsx1.4 kB
// SPDX-FileCopyrightText: Copyright Orangebot, Inc. and Medplum contributors // SPDX-License-Identifier: Apache-2.0 import type { ElementsContextType } from '@medplum/core'; import { render, screen } from '../test-utils/render'; import { ElementsInput } from './ElementsInput'; import { ElementsContext } from './ElementsInput.utils'; const elementsContext: ElementsContextType = { debugMode: false, elements: { test: { description: 'test', max: 1, min: 0, path: 'test', type: [{ code: 'testCode', profile: ['testProfile'], targetProfile: ['testTargetProfile'] }], }, }, elementsByPath: { test: { description: 'test', max: 1, min: 0, path: 'test', type: [{ code: 'testCode', profile: ['testProfile'], targetProfile: ['testTargetProfile'] }], }, }, path: 'elements', profileUrl: 'testProfileUrl', getExtendedProps: () => undefined, }; const onChange = jest.fn(); describe('ElementsInput', () => { test('Renders', () => { render( <ElementsContext.Provider value={elementsContext}> <ElementsInput defaultValue={'testValue'} onChange={onChange} outcome={undefined} path="test" testId="test" type="elementsinput" /> </ElementsContext.Provider> ); expect(screen.getByTestId('test')).toBeDefined(); }); });

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/medplum/medplum'

If you have feedback or need assistance with the MCP directory API, please join our Discord server