Skip to main content
Glama
TaskSelectEmpty.test.tsx1.2 kB
// SPDX-FileCopyrightText: Copyright Orangebot, Inc. and Medplum contributors // SPDX-License-Identifier: Apache-2.0 import { MantineProvider } from '@mantine/core'; import { render, screen } from '@testing-library/react'; import { describe, expect, test } from 'vitest'; import { TaskSelectEmpty } from './TaskSelectEmpty'; describe('TaskSelectEmpty', () => { const setup = (props: { notFound?: boolean } = {}): ReturnType<typeof render> => { return render( <MantineProvider> <TaskSelectEmpty {...props} /> </MantineProvider> ); }; test('renders "No task selected" message by default', () => { setup(); expect(screen.getByText('No task selected')).toBeInTheDocument(); expect( screen.getByText('Select a task from the list to view details, add notes, and manage properties') ).toBeInTheDocument(); }); test('renders "Task not found" message when notFound is true', () => { setup({ notFound: true }); expect(screen.getByText('Task not found')).toBeInTheDocument(); expect( screen.queryByText('Select a task from the list to view details, add notes, and manage properties') ).not.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