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