errorItem.spec.tsx 789 B

123456789101112131415161718192021222324252627
  1. import {render, screen, userEvent} from 'sentry-test/reactTestingLibrary';
  2. import {ErrorItem} from 'sentry/components/events/errorItem';
  3. describe('Issue error item', function () {
  4. it('expand subitems', function () {
  5. render(
  6. <ErrorItem
  7. error={{
  8. data: {
  9. mapping_uuid: 'd270a1a0-1970-3c05-cb09-2cb00b4335ee',
  10. },
  11. type: 'proguard_missing_mapping',
  12. message: 'A proguard mapping file was missing.',
  13. }}
  14. />
  15. );
  16. expect(screen.getByText('A proguard mapping file was missing.')).toBeInTheDocument();
  17. expect(screen.queryByText('Mapping Uuid')).not.toBeInTheDocument();
  18. userEvent.click(screen.getByLabelText('Expand'));
  19. expect(screen.getByText('Mapping Uuid')).toBeInTheDocument();
  20. });
  21. });