summaryrefslogtreecommitdiff
path: root/spec/frontend/issues_list/mock_data.js
blob: 99267fb6e3102429784d1762326b47f63fdaf536 (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
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
import {
  OPERATOR_IS,
  OPERATOR_IS_NOT,
} from '~/vue_shared/components/filtered_search_bar/constants';

export const locationSearch = [
  '?search=find+issues',
  'author_username=homer',
  'not[author_username]=marge',
  'assignee_username[]=bart',
  'assignee_username[]=lisa',
  'not[assignee_username][]=patty',
  'not[assignee_username][]=selma',
  'milestone_title=season+4',
  'not[milestone_title]=season+20',
  'label_name[]=cartoon',
  'label_name[]=tv',
  'not[label_name][]=live action',
  'not[label_name][]=drama',
  'my_reaction_emoji=thumbsup',
  'confidential=no',
  'iteration_title=season:+%234',
  'not[iteration_title]=season:+%2320',
  'epic_id=gitlab-org%3A%3A%2612',
  'not[epic_id]=gitlab-org%3A%3A%2634',
  'weight=1',
  'not[weight]=3',
].join('&');

export const locationSearchWithSpecialValues = [
  'assignee_id=123',
  'assignee_username=bart',
  'my_reaction_emoji=None',
  'iteration_id=Current',
  'epic_id=None',
  'weight=None',
].join('&');

export const filteredTokens = [
  { type: 'author_username', value: { data: 'homer', operator: OPERATOR_IS } },
  { type: 'author_username', value: { data: 'marge', operator: OPERATOR_IS_NOT } },
  { type: 'assignee_username', value: { data: 'bart', operator: OPERATOR_IS } },
  { type: 'assignee_username', value: { data: 'lisa', operator: OPERATOR_IS } },
  { type: 'assignee_username', value: { data: 'patty', operator: OPERATOR_IS_NOT } },
  { type: 'assignee_username', value: { data: 'selma', operator: OPERATOR_IS_NOT } },
  { type: 'milestone', value: { data: 'season 4', operator: OPERATOR_IS } },
  { type: 'milestone', value: { data: 'season 20', operator: OPERATOR_IS_NOT } },
  { type: 'labels', value: { data: 'cartoon', operator: OPERATOR_IS } },
  { type: 'labels', value: { data: 'tv', operator: OPERATOR_IS } },
  { type: 'labels', value: { data: 'live action', operator: OPERATOR_IS_NOT } },
  { type: 'labels', value: { data: 'drama', operator: OPERATOR_IS_NOT } },
  { type: 'my_reaction_emoji', value: { data: 'thumbsup', operator: OPERATOR_IS } },
  { type: 'confidential', value: { data: 'no', operator: OPERATOR_IS } },
  { type: 'iteration', value: { data: 'season: #4', operator: OPERATOR_IS } },
  { type: 'iteration', value: { data: 'season: #20', operator: OPERATOR_IS_NOT } },
  { type: 'epic_id', value: { data: 'gitlab-org::&12', operator: OPERATOR_IS } },
  { type: 'epic_id', value: { data: 'gitlab-org::&34', operator: OPERATOR_IS_NOT } },
  { type: 'weight', value: { data: '1', operator: OPERATOR_IS } },
  { type: 'weight', value: { data: '3', operator: OPERATOR_IS_NOT } },
  { type: 'filtered-search-term', value: { data: 'find' } },
  { type: 'filtered-search-term', value: { data: 'issues' } },
];

export const filteredTokensWithSpecialValues = [
  { type: 'assignee_username', value: { data: '123', operator: OPERATOR_IS } },
  { type: 'assignee_username', value: { data: 'bart', operator: OPERATOR_IS } },
  { type: 'my_reaction_emoji', value: { data: 'None', operator: OPERATOR_IS } },
  { type: 'iteration', value: { data: 'Current', operator: OPERATOR_IS } },
  { type: 'epic_id', value: { data: 'None', operator: OPERATOR_IS } },
  { type: 'weight', value: { data: 'None', operator: OPERATOR_IS } },
];

export const apiParams = {
  author_username: 'homer',
  'not[author_username]': 'marge',
  assignee_username: ['bart', 'lisa'],
  'not[assignee_username]': ['patty', 'selma'],
  milestone: 'season 4',
  'not[milestone]': 'season 20',
  labels: ['cartoon', 'tv'],
  'not[labels]': ['live action', 'drama'],
  my_reaction_emoji: 'thumbsup',
  confidential: 'no',
  iteration_title: 'season: #4',
  'not[iteration_title]': 'season: #20',
  epic_id: '12',
  'not[epic_id]': 'gitlab-org::&34',
  weight: '1',
  'not[weight]': '3',
};

export const apiParamsWithSpecialValues = {
  assignee_id: '123',
  assignee_username: 'bart',
  my_reaction_emoji: 'None',
  iteration_id: 'Current',
  epic_id: 'None',
  weight: 'None',
};

export const urlParams = {
  author_username: 'homer',
  'not[author_username]': 'marge',
  'assignee_username[]': ['bart', 'lisa'],
  'not[assignee_username][]': ['patty', 'selma'],
  milestone_title: 'season 4',
  'not[milestone_title]': 'season 20',
  'label_name[]': ['cartoon', 'tv'],
  'not[label_name][]': ['live action', 'drama'],
  my_reaction_emoji: 'thumbsup',
  confidential: 'no',
  iteration_title: 'season: #4',
  'not[iteration_title]': 'season: #20',
  epic_id: 'gitlab-org%3A%3A%2612',
  'not[epic_id]': 'gitlab-org::&34',
  weight: '1',
  'not[weight]': '3',
};

export const urlParamsWithSpecialValues = {
  assignee_id: '123',
  'assignee_username[]': 'bart',
  my_reaction_emoji: 'None',
  iteration_id: 'Current',
  epic_id: 'None',
  weight: 'None',
};