Skip to main content
Glama
ContactPointDisplay.test.tsx1.32 kB
// SPDX-FileCopyrightText: Copyright Orangebot, Inc. and Medplum contributors // SPDX-License-Identifier: Apache-2.0 import { render, screen } from '../test-utils/render'; import { ContactPointDisplay } from './ContactPointDisplay'; describe('ContactPointDisplay', () => { test('Handles undefined value', () => { render(<ContactPointDisplay />); }); test('Handles empty value', () => { render(<ContactPointDisplay value={{}} />); }); test('Renders value', () => { render(<ContactPointDisplay value={{ value: 'homer@example.com' }} />); expect(screen.getByText('homer@example.com', { exact: false })).toBeInTheDocument(); }); test('Renders full', () => { render(<ContactPointDisplay value={{ system: 'email', use: 'home', value: 'homer@example.com' }} />); expect(screen.getByText('homer@example.com', { exact: false })).toBeInTheDocument(); }); test('Only use', () => { render(<ContactPointDisplay value={{ use: 'home', value: 'homer@example.com' }} />); expect(screen.getByText('homer@example.com', { exact: false })).toBeInTheDocument(); }); test('Only system', () => { render(<ContactPointDisplay value={{ use: 'home', value: 'homer@example.com' }} />); expect(screen.getByText('homer@example.com', { exact: false })).toBeInTheDocument(); }); });

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