utils.spec.tsx 879 B

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