BigW Consortium Gitlab

mock_data.js 2.93 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
export const currentSession = {
  username: 'root',
  storageKey: 'root/frequent-projects',
  apiVersion: 'v4',
  project: {
    id: 1,
    name: 'dummy-project',
    namespace: 'SamepleGroup / Dummy-Project',
    webUrl: 'http://127.0.0.1/samplegroup/dummy-project',
    avatarUrl: null,
    lastAccessedOn: Date.now(),
  },
};

export const mockProject = {
  id: 1,
  name: 'GitLab Community Edition',
  namespace: 'gitlab-org / gitlab-ce',
  webUrl: 'http://127.0.0.1:3000/gitlab-org/gitlab-ce',
  avatarUrl: null,
};

export const mockRawProject = {
  id: 1,
  name: 'GitLab Community Edition',
  name_with_namespace: 'gitlab-org / gitlab-ce',
  web_url: 'http://127.0.0.1:3000/gitlab-org/gitlab-ce',
  avatar_url: null,
};

export const mockFrequents = [
  {
    id: 1,
    name: 'GitLab Community Edition',
    namespace: 'gitlab-org / gitlab-ce',
    webUrl: 'http://127.0.0.1:3000/gitlab-org/gitlab-ce',
    avatarUrl: null,
  },
  {
    id: 2,
    name: 'GitLab CI',
    namespace: 'gitlab-org / gitlab-ci',
    webUrl: 'http://127.0.0.1:3000/gitlab-org/gitlab-ci',
    avatarUrl: null,
  },
  {
    id: 3,
    name: 'Typeahead.Js',
    namespace: 'twitter / typeahead-js',
    webUrl: 'http://127.0.0.1:3000/twitter/typeahead-js',
    avatarUrl: '/uploads/-/system/project/avatar/7/TWBS.png',
  },
  {
    id: 4,
    name: 'Intel',
    namespace: 'platform / hardware / bsp / intel',
    webUrl: 'http://127.0.0.1:3000/platform/hardware/bsp/intel',
    avatarUrl: null,
  },
  {
    id: 5,
    name: 'v4.4',
    namespace: 'platform / hardware / bsp / kernel / common / v4.4',
    webUrl: 'http://localhost:3000/platform/hardware/bsp/kernel/common/v4.4',
    avatarUrl: null,
  },
];

export const unsortedFrequents = [
  { id: 1, frequency: 12, lastAccessedOn: 1491400843391 },
  { id: 2, frequency: 14, lastAccessedOn: 1488240890738 },
  { id: 3, frequency: 44, lastAccessedOn: 1497675908472 },
  { id: 4, frequency: 8, lastAccessedOn: 1497979281815 },
  { id: 5, frequency: 34, lastAccessedOn: 1488089211943 },
  { id: 6, frequency: 14, lastAccessedOn: 1493517292488 },
  { id: 7, frequency: 42, lastAccessedOn: 1486815299875 },
  { id: 8, frequency: 33, lastAccessedOn: 1500762279114 },
  { id: 10, frequency: 46, lastAccessedOn: 1483251641543 },
];

/**
 * This const has a specific order which tests authenticity
 * of `ProjectsService.getTopFrequentProjects` method so
 * DO NOT change order of items in this const.
 */
export const sortedFrequents = [
  { id: 10, frequency: 46, lastAccessedOn: 1483251641543 },
  { id: 3, frequency: 44, lastAccessedOn: 1497675908472 },
  { id: 7, frequency: 42, lastAccessedOn: 1486815299875 },
  { id: 5, frequency: 34, lastAccessedOn: 1488089211943 },
  { id: 8, frequency: 33, lastAccessedOn: 1500762279114 },
  { id: 6, frequency: 14, lastAccessedOn: 1493517292488 },
  { id: 2, frequency: 14, lastAccessedOn: 1488240890738 },
  { id: 1, frequency: 12, lastAccessedOn: 1491400843391 },
  { id: 4, frequency: 8, lastAccessedOn: 1497979281815 },
];