utils.spec.tsx 989 B

12345678910111213141516171819202122232425
  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 add inbox tab for issue-priority-ui feature', () => {
  17. expect(getTabs(OrganizationFixture({features: ['issue-priority-ui']}))[0]).toEqual([
  18. 'is:unresolved issue.priority:[high, medium]',
  19. expect.objectContaining({name: 'Inbox'}),
  20. ]);
  21. });
  22. });