utils.spec.tsx 955 B

123456789101112131415161718192021222324252627282930313233343536
  1. import {OrganizationFixture} 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(OrganizationFixture({features: ['escalating-issues']})).map(
  7. tab => tab[1].name
  8. )
  9. ).toEqual([
  10. 'Unresolved',
  11. 'For Review',
  12. 'Regressed',
  13. 'Escalating',
  14. 'Archived',
  15. 'Custom',
  16. ]);
  17. expect(getTabs(OrganizationFixture({features: []})).map(tab => tab[1].name)).toEqual([
  18. 'All Unresolved',
  19. 'For Review',
  20. 'Ignored',
  21. 'Custom',
  22. ]);
  23. });
  24. it('should enable/disable my_teams filter in For Review tab', () => {
  25. expect(getTabs(OrganizationFixture({features: []})).map(tab => tab[0])).toEqual([
  26. 'is:unresolved',
  27. 'is:unresolved is:for_review assigned_or_suggested:[me, my_teams, none]',
  28. 'is:ignored',
  29. '__custom__',
  30. ]);
  31. });
  32. });