]> source.dussan.org Git - sonarqube.git/blob
2a91409ee8cd2a80d136ba7027d701831edef9b3
[sonarqube.git] /
1 // Jest Snapshot v1, https://goo.gl/fbAQLP
2
3 exports[`#renderDeactivateButton should render correctly 1`] = `
4 <ConfirmButton
5   confirmButtonText="yes"
6   modalBody="coding_rules.deactivate.confirm"
7   modalHeader="coding_rules.deactivate"
8   onConfirm={[Function]}
9 >
10   [Function]
11 </ConfirmButton>
12 `;
13
14 exports[`#renderDeactivateButton should render correctly 2`] = `
15 <Tooltip
16   overlay="coding_rules.need_extend_or_copy"
17 >
18   <Button
19     className="coding-rules-detail-quality-profile-deactivate button-red"
20     disabled={true}
21   >
22     coding_rules.deactivate
23   </Button>
24 </Tooltip>
25 `;
26
27 exports[`renderActions should disable the button when I am on a built-in profile 1`] = `
28 <td
29   className="coding-rule-table-meta-cell coding-rule-activation-actions"
30 >
31   <Tooltip
32     overlay="coding_rules.need_extend_or_copy"
33   >
34     <Button
35       className="coding-rules-detail-quality-profile-deactivate button-red"
36       disabled={true}
37     >
38       coding_rules.deactivate
39     </Button>
40   </Tooltip>
41 </td>
42 `;
43
44 exports[`renderActions should render the activate button 1`] = `
45 <td
46   className="coding-rule-table-meta-cell coding-rule-activation-actions"
47 >
48   <ActivationButton
49     buttonText="coding_rules.activate"
50     className="coding-rules-detail-quality-profile-activate"
51     modalHeader="coding_rules.activate_in_quality_profile"
52     onDone={[Function]}
53     profiles={
54       Array [
55         Object {
56           "actions": Object {
57             "edit": true,
58           },
59           "activeDeprecatedRuleCount": 2,
60           "activeRuleCount": 10,
61           "childrenCount": 0,
62           "depth": 1,
63           "isBuiltIn": false,
64           "isDefault": false,
65           "isInherited": false,
66           "key": "key",
67           "language": "js",
68           "languageName": "JavaScript",
69           "name": "name",
70           "organization": "foo",
71           "projectCount": 3,
72         },
73       ]
74     }
75     rule={
76       Object {
77         "isTemplate": false,
78         "key": "javascript:S1067",
79         "lang": "js",
80         "langName": "JavaScript",
81         "name": "Use foo",
82         "severity": "MAJOR",
83         "status": "READY",
84         "sysTags": Array [
85           "a",
86           "b",
87         ],
88         "tags": Array [
89           "x",
90         ],
91         "type": "CODE_SMELL",
92       }
93     }
94   />
95 </td>
96 `;
97
98 exports[`renderActions should render the deactivate button 1`] = `
99 <td
100   className="coding-rule-table-meta-cell coding-rule-activation-actions"
101 >
102   <ConfirmButton
103     confirmButtonText="yes"
104     modalBody="coding_rules.deactivate.confirm"
105     modalHeader="coding_rules.deactivate"
106     onConfirm={[Function]}
107   >
108     [Function]
109   </ConfirmButton>
110 </td>
111 `;
112
113 exports[`should render correctly: default 1`] = `
114 <div
115   className="coding-rule"
116   data-rule="javascript:S1067"
117 >
118   <table
119     className="coding-rule-table"
120   >
121     <tbody>
122       <tr>
123         <td>
124           <div
125             className="coding-rule-title"
126           >
127             <Link
128               className="link-no-underline"
129               onClick={[Function]}
130               onlyActiveOnIndex={false}
131               style={Object {}}
132               to={
133                 Object {
134                   "pathname": "/coding_rules",
135                   "query": Object {
136                     "open": "javascript:S1067",
137                     "rule_key": "javascript:S1067",
138                   },
139                 }
140               }
141             >
142               Use foo
143             </Link>
144           </div>
145         </td>
146         <td
147           className="coding-rule-table-meta-cell"
148         >
149           <div
150             className="display-flex-center coding-rule-meta"
151           >
152             <span
153               className="display-inline-flex-center spacer-left note"
154             >
155               JavaScript
156             </span>
157             <Tooltip
158               overlay="coding_rules.type.tooltip.CODE_SMELL"
159             >
160               <span
161                 className="display-inline-flex-center spacer-left note"
162               >
163                 <IssueTypeIcon
164                   query="CODE_SMELL"
165                 />
166                 <span
167                   className="little-spacer-left text-middle"
168                 >
169                   issue.type.CODE_SMELL
170                 </span>
171               </span>
172             </Tooltip>
173             <TagsList
174               allowUpdate={false}
175               className="display-inline-flex-center note spacer-left"
176               tags={
177                 Array [
178                   "x",
179                   "a",
180                   "b",
181                 ]
182               }
183             />
184             <SimilarRulesFilter
185               onFilterChange={[MockFunction]}
186               rule={
187                 Object {
188                   "key": "javascript:S1067",
189                   "lang": "js",
190                   "langName": "JavaScript",
191                   "name": "Use foo",
192                   "severity": "MAJOR",
193                   "status": "READY",
194                   "sysTags": Array [
195                     "a",
196                     "b",
197                   ],
198                   "tags": Array [
199                     "x",
200                   ],
201                   "type": "CODE_SMELL",
202                 }
203               }
204             />
205           </div>
206         </td>
207       </tr>
208     </tbody>
209   </table>
210 </div>
211 `;
212
213 exports[`should render correctly: with activation 1`] = `
214 <div
215   className="coding-rule"
216   data-rule="javascript:S1067"
217 >
218   <table
219     className="coding-rule-table"
220   >
221     <tbody>
222       <tr>
223         <td>
224           <div
225             className="coding-rule-title"
226           >
227             <Link
228               className="link-no-underline"
229               onClick={[Function]}
230               onlyActiveOnIndex={false}
231               style={Object {}}
232               to={
233                 Object {
234                   "pathname": "/coding_rules",
235                   "query": Object {
236                     "open": "javascript:S1067",
237                     "rule_key": "javascript:S1067",
238                   },
239                 }
240               }
241             >
242               Use foo
243             </Link>
244           </div>
245         </td>
246         <td
247           className="coding-rule-table-meta-cell"
248         >
249           <div
250             className="display-flex-center coding-rule-meta"
251           >
252             <span
253               className="display-inline-flex-center spacer-left note"
254             >
255               JavaScript
256             </span>
257             <Tooltip
258               overlay="coding_rules.type.tooltip.CODE_SMELL"
259             >
260               <span
261                 className="display-inline-flex-center spacer-left note"
262               >
263                 <IssueTypeIcon
264                   query="CODE_SMELL"
265                 />
266                 <span
267                   className="little-spacer-left text-middle"
268                 >
269                   issue.type.CODE_SMELL
270                 </span>
271               </span>
272             </Tooltip>
273             <TagsList
274               allowUpdate={false}
275               className="display-inline-flex-center note spacer-left"
276               tags={
277                 Array [
278                   "x",
279                   "a",
280                   "b",
281                 ]
282               }
283             />
284             <SimilarRulesFilter
285               onFilterChange={[MockFunction]}
286               rule={
287                 Object {
288                   "key": "javascript:S1067",
289                   "lang": "js",
290                   "langName": "JavaScript",
291                   "name": "Use foo",
292                   "severity": "MAJOR",
293                   "status": "READY",
294                   "sysTags": Array [
295                     "a",
296                     "b",
297                   ],
298                   "tags": Array [
299                     "x",
300                   ],
301                   "type": "CODE_SMELL",
302                 }
303               }
304             />
305           </div>
306         </td>
307       </tr>
308     </tbody>
309   </table>
310 </div>
311 `;