firstEventIndicator.spec.jsx 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. import {mountWithTheme} from 'sentry-test/enzyme';
  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. const wrapper = mountWithTheme(<Indicator organization={org} firstIssue={null} />);
  7. expect(wrapper.find('WaitingIndicator').exists()).toBe(true);
  8. });
  9. describe('received first event', function () {
  10. it('renders', function () {
  11. const org = TestStubs.Organization();
  12. const wrapper = mountWithTheme(
  13. <Indicator organization={org} firstIssue={{id: 1}} />
  14. );
  15. expect(wrapper.find('ReceivedIndicator').exists()).toBe(true);
  16. });
  17. it('renders without a known issue ID', function () {
  18. const org = TestStubs.Organization();
  19. const project = TestStubs.ProjectDetails({});
  20. const wrapper = mountWithTheme(
  21. <Indicator organization={org} project={project} firstIssue />
  22. );
  23. // No button when there is no known issue ID
  24. expect(wrapper.find('ReceivedIndicator').exists()).toBe(true);
  25. });
  26. });
  27. });