messageSpanSamplesTable.spec.tsx 1.1 KB

1234567891011121314151617181920212223242526
  1. import {OrganizationFixture} from 'sentry-fixture/organization';
  2. import {render, screen} from 'sentry-test/reactTestingLibrary';
  3. import useOrganization from 'sentry/utils/useOrganization';
  4. import {MessageSpanSamplesTable} from 'sentry/views/performance/queues/messageSpanSamplesTable';
  5. jest.mock('sentry/utils/useOrganization');
  6. describe('messageSpanSamplesTable', () => {
  7. const organization = OrganizationFixture();
  8. jest.mocked(useOrganization).mockReturnValue(organization);
  9. beforeEach(() => {});
  10. it('renders', () => {
  11. render(<MessageSpanSamplesTable data={[]} isLoading={false} />);
  12. expect(screen.getByRole('table', {name: 'Span Samples'})).toBeInTheDocument();
  13. expect(screen.getByRole('columnheader', {name: 'Span ID'})).toBeInTheDocument();
  14. expect(screen.getByRole('columnheader', {name: 'Message ID'})).toBeInTheDocument();
  15. expect(
  16. screen.getByRole('columnheader', {name: 'Processing Latency'})
  17. ).toBeInTheDocument();
  18. expect(screen.getByRole('columnheader', {name: 'Message Size'})).toBeInTheDocument();
  19. expect(screen.getByRole('columnheader', {name: 'Status'})).toBeInTheDocument();
  20. });
  21. });