replayList.ts 978 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import {duration} from 'moment';
  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. id: '346789a703f6454384f1de473b8b9fcc',
  22. is_archived: false,
  23. os: {
  24. name: 'sentry.javascript.react',
  25. version: '7.42.0',
  26. },
  27. project_id: '2',
  28. started_at: new Date('2022-09-15T06:50:03+00:00'),
  29. user: {
  30. display_name: 'testDisplayName',
  31. email: '',
  32. id: '147086',
  33. ip: '127.0.0.1',
  34. username: 'testDisplayName',
  35. },
  36. },
  37. ];
  38. }