mutedBox.spec.jsx 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. import {mountWithTheme} from 'sentry-test/enzyme';
  2. import MutedBox from 'app/components/mutedBox';
  3. describe('MutedBox', function () {
  4. describe('render()', function () {
  5. it('handles ignoreUntil', function () {
  6. const wrapper = mountWithTheme(
  7. <MutedBox statusDetails={{ignoreUntil: '2017-06-21T19:45:10Z'}} />
  8. );
  9. expect(wrapper).toSnapshot();
  10. });
  11. it('handles ignoreCount', function () {
  12. const wrapper = mountWithTheme(<MutedBox statusDetails={{ignoreUserCount: 100}} />);
  13. expect(wrapper).toSnapshot();
  14. });
  15. it('handles ignoreCount with ignoreWindow', function () {
  16. const wrapper = mountWithTheme(
  17. <MutedBox statusDetails={{ignoreCount: 100, ignoreWindow: 1}} />
  18. );
  19. expect(wrapper).toSnapshot();
  20. });
  21. it('handles ignoreUserCount', function () {
  22. const wrapper = mountWithTheme(<MutedBox statusDetails={{ignoreUserCount: 100}} />);
  23. expect(wrapper).toSnapshot();
  24. });
  25. it('handles ignoreUserCount with ignoreUserWindow', function () {
  26. const wrapper = mountWithTheme(
  27. <MutedBox statusDetails={{ignoreUserCount: 100, ignoreUserWindow: 1}} />
  28. );
  29. expect(wrapper).toSnapshot();
  30. });
  31. it('handles default', function () {
  32. const wrapper = mountWithTheme(<MutedBox statusDetails={{}} />);
  33. expect(wrapper).toSnapshot();
  34. });
  35. });
  36. });