firstEventIndicator.spec.jsx 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. import {render, screen} from 'sentry-test/reactTestingLibrary';
  2. import {Indicator} from 'sentry/views/onboarding/components/firstEventIndicator';
  3. describe('FirstEventIndicator', function () {
  4. it('renders waiting status', function () {
  5. const org = TestStubs.Organization();
  6. render(<Indicator organization={org} firstIssue={null} />);
  7. expect(
  8. screen.getByText('Waiting to receive first event to continue')
  9. ).toBeInTheDocument();
  10. });
  11. describe('received first event', function () {
  12. it('renders', function () {
  13. const org = TestStubs.Organization();
  14. render(<Indicator organization={org} firstIssue={{id: 1}} />);
  15. expect(screen.getByText('Event was received!')).toBeInTheDocument();
  16. });
  17. it('renders without a known issue ID', function () {
  18. const org = TestStubs.Organization();
  19. const project = TestStubs.ProjectDetails({});
  20. render(<Indicator organization={org} project={project} firstIssue />);
  21. // No button when there is no known issue ID
  22. expect(screen.getByText('Event was received!')).toBeInTheDocument();
  23. });
  24. });
  25. });