config.tsx 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. import {User} from 'sentry-fixture/user';
  2. import {Config as ConfigType} from 'sentry/types';
  3. export function Config(params: Partial<ConfigType> = {}): ConfigType {
  4. return {
  5. theme: 'light',
  6. user: User(),
  7. messages: [],
  8. languageCode: 'en',
  9. csrfCookieName: 'csrf-test-cookie',
  10. superUserCookieName: 'su-test-cookie',
  11. superUserCookieDomain: '.sentry.io',
  12. validateSUForm: true,
  13. features: new Set(),
  14. singleOrganization: false,
  15. enableAnalytics: true,
  16. urlPrefix: 'https://sentry-jest-tests.example.com/',
  17. needsUpgrade: false,
  18. supportEmail: 'support@sentry.io',
  19. invitesEnabled: false,
  20. privacyUrl: null,
  21. termsUrl: null,
  22. // Maintain isOnPremise key for backcompat (plugins?).
  23. isOnPremise: false,
  24. isSelfHosted: false,
  25. lastOrganization: null,
  26. gravatarBaseUrl: 'https://gravatar.com',
  27. dsn: 'test-dsn',
  28. userIdentity: {
  29. ip_address: '127.0.0.1',
  30. email: 'example@example.com',
  31. id: '1',
  32. isStaff: false,
  33. },
  34. isAuthenticated: true,
  35. version: {
  36. current: '1.0.0-dev',
  37. latest: '1.0.0-dev',
  38. build: 'test-build',
  39. upgradeAvailable: false,
  40. },
  41. sentryConfig: {
  42. dsn: 'test-dsn',
  43. release: '1.0.0.-dev',
  44. allowUrls: [],
  45. tracePropagationTargets: [],
  46. },
  47. distPrefix: '',
  48. disableU2FForSUForm: false,
  49. apmSampling: 1,
  50. demoMode: false,
  51. customerDomain: {
  52. subdomain: 'foobar',
  53. organizationUrl: 'https://foobar.sentry.io',
  54. sentryUrl: 'https://sentry.io',
  55. },
  56. links: {
  57. sentryUrl: 'https://sentry.io',
  58. organizationUrl: 'https://foobar.sentry.io',
  59. regionUrl: 'https://us.sentry.io',
  60. },
  61. regions: [{name: 'us', url: 'https://sentry.io'}],
  62. ...params,
  63. };
  64. }