utils.spec.tsx 1.1 KB

12345678910111213141516171819202122232425262728
  1. import {OrganizationFixture} from 'sentry-fixture/organization';
  2. import {getTabs} from './utils';
  3. describe('getTabs', () => {
  4. it('displays the correct list of tabs', () => {
  5. expect(getTabs(OrganizationFixture({})).filter(tab => !tab[1].hidden)).toEqual([
  6. ['is:unresolved', expect.objectContaining({name: 'Unresolved'})],
  7. [
  8. 'is:unresolved is:for_review assigned_or_suggested:[me, my_teams, none]',
  9. expect.objectContaining({name: 'For Review'}),
  10. ],
  11. ['is:regressed', expect.objectContaining({name: 'Regressed'})],
  12. ['is:escalating', expect.objectContaining({name: 'Escalating'})],
  13. ['is:archived', expect.objectContaining({name: 'Archived'})],
  14. ['is:reprocessing', expect.objectContaining({name: 'Reprocessing'})],
  15. ]);
  16. });
  17. it('should replace "unresolved" with "prioritized" for issue-priority-ui feature', () => {
  18. const tabs = getTabs(OrganizationFixture({features: ['issue-priority-ui']}));
  19. expect(tabs[0]).toEqual([
  20. 'is:unresolved issue.priority:[high, medium]',
  21. expect.objectContaining({name: 'Prioritized'}),
  22. ]);
  23. });
  24. });