replayList.ts 1012 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import {duration} from 'moment-timezone';
  2. import type {ReplayListRecord} from 'sentry/views/replays/types';
  3. export function ReplayListFixture(
  4. replayListRecords: ReplayListRecord[] = []
  5. ): ReplayListRecord[] {
  6. if (replayListRecords.length) {
  7. return replayListRecords;
  8. }
  9. return [
  10. {
  11. activity: 1,
  12. browser: {
  13. name: 'Firefox',
  14. version: '111.0',
  15. },
  16. count_dead_clicks: 0,
  17. count_rage_clicks: 0,
  18. count_errors: 0,
  19. duration: duration(30000),
  20. finished_at: new Date('2022-09-15T06:54:00+00:00'),
  21. has_viewed: false,
  22. id: '346789a703f6454384f1de473b8b9fcc',
  23. is_archived: false,
  24. os: {
  25. name: 'sentry.javascript.react',
  26. version: '7.42.0',
  27. },
  28. project_id: '2',
  29. started_at: new Date('2022-09-15T06:50:03+00:00'),
  30. user: {
  31. display_name: 'testDisplayName',
  32. email: '',
  33. id: '147086',
  34. ip: '127.0.0.1',
  35. username: 'testDisplayName',
  36. },
  37. },
  38. ];
  39. }