scoreBar.spec.tsx 1022 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import {render} from 'sentry-test/reactTestingLibrary';
  2. import ScoreBar from 'sentry/components/scoreBar';
  3. describe('ScoreBar', function () {
  4. beforeEach(function () {});
  5. afterEach(function () {});
  6. it('renders', function () {
  7. render(<ScoreBar size={60} thickness={2} score={3} />);
  8. });
  9. it('renders vertically', function () {
  10. render(<ScoreBar size={60} thickness={2} vertical score={2} />);
  11. });
  12. it('renders with score = 0', function () {
  13. render(<ScoreBar size={60} thickness={2} score={0} />);
  14. });
  15. it('renders with score > max score', function () {
  16. render(<ScoreBar size={60} thickness={2} score={10} />);
  17. });
  18. it('renders with < 0 score', function () {
  19. render(<ScoreBar size={60} thickness={2} score={-2} />);
  20. });
  21. it('has custom palette', function () {
  22. render(
  23. <ScoreBar
  24. vertical
  25. size={60}
  26. thickness={2}
  27. score={7}
  28. palette={['white', 'red', 'red', 'pink', 'pink', 'purple', 'purple', 'black']}
  29. />
  30. );
  31. });
  32. });