testUtils.tsx 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. import {UserFixture} from 'sentry-fixture/user';
  2. import type {Commit, Repository} from 'sentry/types/integrations';
  3. import type {User} from 'sentry/types/user';
  4. import type {EventData} from 'sentry/utils/discover/eventView';
  5. export const defaultRow: EventData = {
  6. id: '6b43e285de834ec5b5fe30d62d549b20',
  7. issue: 'SENTRY-VVY',
  8. release: 'backend@22.10.0+aaf33944f93dc8fa4234ca046a8d88fb1dccfb76',
  9. title: 'error: Error -3 while decompressing data: invalid stored block lengths',
  10. 'issue.id': 3512441874,
  11. 'project.name': 'sentry',
  12. };
  13. export const mockedCommit: Commit = {
  14. dateCreated: '2020-11-30T18:46:31Z',
  15. id: 'f7f395d14b2fe29a4e253bf1d3094d61e6ad4434',
  16. message: 'ref(commitRow): refactor to fc\n',
  17. author: {
  18. id: '0',
  19. username: 'author',
  20. ip_address: '192.168.1.1',
  21. email: 'author@commit.com',
  22. name: 'Author',
  23. } as User,
  24. repository: {
  25. id: '1',
  26. integrationId: '2',
  27. name: 'getsentry/sentry',
  28. dateCreated: '2019-11-30T18:46:31Z',
  29. } as Repository,
  30. releases: [],
  31. };
  32. export const mockedUser1 = UserFixture({
  33. id: '2',
  34. username: 'author456',
  35. ip_address: '192.168.1.1',
  36. email: 'author1@commit.com',
  37. name: 'Key Name',
  38. });
  39. export const mockedUser2 = UserFixture({
  40. id: '3',
  41. username: 'author123',
  42. ip_address: '192.168.1.3',
  43. email: 'author2@commit.com',
  44. name: 'Value Name',
  45. });