mutedBox.spec.jsx 1.4 KB

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