TracesPanel.test.tsx 553 B

12345678910111213141516171819202122
  1. import { render, screen } from '@testing-library/react';
  2. import React from 'react';
  3. import { LoadingState, PanelProps } from '@grafana/data';
  4. import { TracesPanel } from './TracesPanel';
  5. describe('TracesPanel', () => {
  6. it('shows no data message when no data supplied', async () => {
  7. const props = {
  8. data: {
  9. error: undefined,
  10. series: [],
  11. state: LoadingState.Done,
  12. },
  13. } as unknown as PanelProps;
  14. render(<TracesPanel {...props} />);
  15. await screen.findByText('No data found in response');
  16. });
  17. });