adminQueue.spec.jsx 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. import {render} from 'sentry-test/reactTestingLibrary';
  2. import {Client} from 'sentry/api';
  3. import AdminQueue from 'sentry/views/admin/adminQueue';
  4. // TODO(dcramer): this doesnt really test anything as we need to
  5. // mock the API Response/wait on it
  6. describe('AdminQueue', function () {
  7. describe('render()', function () {
  8. beforeEach(() => {
  9. Client.addMockResponse({
  10. url: '/internal/queue/tasks/',
  11. body: [
  12. 'celery.backend_cleanup',
  13. 'celery.chain',
  14. 'celery.chord',
  15. 'celery.chord_unlock',
  16. 'celery.chunks',
  17. 'celery.group',
  18. 'celery.map',
  19. 'celery.starmap',
  20. 'sentry.celery.SentryTask',
  21. 'sentry.tasks.activity.send_activity_notifications',
  22. 'sentry.tasks.clear_expired_resolutions',
  23. 'sentry.tasks.commits.fetch_commits',
  24. 'sentry.tasks.deletion.delete_group',
  25. 'sentry.tasks.deletion.run_deletion',
  26. 'sentry.tasks.deletion.run_scheduled_deletions',
  27. 'sentry.tasks.digests.deliver_digest',
  28. 'sentry.tasks.digests.schedule_digests',
  29. 'sentry.tasks.email.process_inbound_email',
  30. 'sentry.tasks.email.send_email',
  31. 'sentry.tasks.email_unlink_notifications',
  32. 'sentry.tasks.merge.merge_group',
  33. 'sentry.tasks.merge.rehash_group_events',
  34. 'sentry.tasks.post_process.plugin_post_process_group',
  35. 'sentry.tasks.post_process.post_process_group',
  36. 'sentry.tasks.process_buffer.process_incr',
  37. 'sentry.tasks.process_buffer.process_pending',
  38. 'sentry.tasks.send_sso_link_emails',
  39. 'sentry.tasks.store.preprocess_event',
  40. 'sentry.tasks.store.preprocess_event_from_reprocessing',
  41. 'sentry.tasks.store.process_event',
  42. 'sentry.tasks.store.process_event_from_reprocessing',
  43. 'sentry.tasks.store.save_event',
  44. 'sentry.tasks.unmerge',
  45. ],
  46. });
  47. });
  48. it('renders', function () {
  49. MockApiClient.warnOnMissingMocks();
  50. const wrapper = render(<AdminQueue params={{}} />);
  51. expect(wrapper.container).toSnapshot();
  52. });
  53. });
  54. });