utils.spec.tsx 1.0 KB

123456789101112131415161718192021222324252627
  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. ]);
  15. });
  16. it('should replace "unresolved" with "prioritized" for issue-priority-ui feature', () => {
  17. const tabs = getTabs(OrganizationFixture({features: ['issue-priority-ui']}));
  18. expect(tabs[0]).toEqual([
  19. 'is:unresolved issue.priority:[high, medium]',
  20. expect.objectContaining({name: 'Prioritized'}),
  21. ]);
  22. });
  23. });