Skip to main content
Glama
BulkAppPage.test.tsx1.39 kB
// SPDX-FileCopyrightText: Copyright Orangebot, Inc. and Medplum contributors // SPDX-License-Identifier: Apache-2.0 import { MockClient } from '@medplum/mock'; import { MedplumProvider } from '@medplum/react'; import { MemoryRouter } from 'react-router'; import { AppRoutes } from './AppRoutes'; import { act, render, screen } from './test-utils/render'; const medplum = new MockClient(); describe('BulkAppPage', () => { async function setup(url: string): Promise<void> { await act(async () => { render( <MedplumProvider medplum={medplum}> <MemoryRouter initialEntries={[url]} initialIndex={0}> <AppRoutes /> </MemoryRouter> </MedplumProvider> ); }); } test('Patient apps', async () => { await setup('/bulk/Patient?ids=123,456'); expect(await screen.findByText('Vitals')).toBeInTheDocument(); }); test('No apps for resource type', async () => { await setup('/bulk/DeviceDefinition?ids=123'); expect(await screen.findByText('No apps for DeviceDefinition')).toBeInTheDocument(); }); test('No query params', async () => { await setup('/bulk/Patient'); expect(await screen.findByText('Vitals')).toBeInTheDocument(); }); test('Empty IDs', async () => { await setup('/bulk/Patient?ids=123,,,'); expect(await screen.findByText('Vitals')).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