utils.spec.tsx 911 B

12345678910111213141516171819202122232425262728293031323334
  1. import {Organization} from 'sentry-fixture/organization';
  2. import {getTabs} from './utils';
  3. describe('getTabs', () => {
  4. it('should enable/disable tabs for escalating-issues', () => {
  5. expect(
  6. getTabs(Organization({features: ['escalating-issues']})).map(tab => tab[1].name)
  7. ).toEqual([
  8. 'Unresolved',
  9. 'For Review',
  10. 'Regressed',
  11. 'Escalating',
  12. 'Archived',
  13. 'Custom',
  14. ]);
  15. expect(getTabs(Organization({features: []})).map(tab => tab[1].name)).toEqual([
  16. 'All Unresolved',
  17. 'For Review',
  18. 'Ignored',
  19. 'Custom',
  20. ]);
  21. });
  22. it('should enable/disable my_teams filter in For Review tab', () => {
  23. expect(getTabs(Organization({features: []})).map(tab => tab[0])).toEqual([
  24. 'is:unresolved',
  25. 'is:unresolved is:for_review assigned_or_suggested:[me, my_teams, none]',
  26. 'is:ignored',
  27. '__custom__',
  28. ]);
  29. });
  30. });