Welcome to mirror list, hosted at ThFree Co, Russian Federation.

mock_data.js « nav « frontend « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2052acfe0018f634a33a34c091c150853954aefb (plain)
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
import { range } from 'lodash';

export const TEST_NAV_DATA = {
  menuTitle: 'Test Menu Title',
  primary: [
    ...['projects', 'groups'].map((view) => ({
      id: view,
      href: null,
      title: view,
      view,
    })),
    ...range(0, 2).map((idx) => ({
      id: `primary-link-${idx}`,
      href: `/path/to/primary/${idx}`,
      title: `Title ${idx}`,
    })),
  ],
  secondary: range(0, 2).map((idx) => ({
    id: `secondary-link-${idx}`,
    href: `/path/to/secondary/${idx}`,
    title: `SecTitle ${idx}`,
  })),
  views: {
    projects: {
      namespace: 'projects',
      currentUserName: '',
      currentItem: {},
      linksPrimary: [{ id: 'project-link', href: '/path/to/projects', title: 'Project Link' }],
      linksSecondary: [],
    },
    groups: {
      namespace: 'groups',
      currentUserName: '',
      currentItem: {},
      linksPrimary: [],
      linksSecondary: [{ id: 'group-link', href: '/path/to/groups', title: 'Group Link' }],
    },
  },
};