]> source.dussan.org Git - sonarqube.git/blob
279ddfd36e6145e978e2bf45aa8837a1530bd36a
[sonarqube.git] /
1 // Jest Snapshot v1, https://goo.gl/fbAQLP
2
3 exports[`renderActions should disable the button when I am on a built-in profile 1`] = `
4 <td
5   className="coding-rule-table-meta-cell coding-rule-activation-actions"
6 >
7   <Tooltip
8     overlay="coding_rules.need_extend_or_copy"
9   >
10     <Button
11       className="coding-rules-detail-quality-profile-deactivate button-red"
12       disabled={true}
13     >
14       coding_rules.deactivate
15     </Button>
16   </Tooltip>
17 </td>
18 `;
19
20 exports[`renderActions should render the activate button 1`] = `
21 <td
22   className="coding-rule-table-meta-cell coding-rule-activation-actions"
23 >
24   <ActivationButton
25     buttonText="coding_rules.activate"
26     className="coding-rules-detail-quality-profile-activate"
27     modalHeader="coding_rules.activate_in_quality_profile"
28     onDone={[Function]}
29     organization="org"
30     profiles={
31       Array [
32         Object {
33           "actions": Object {
34             "edit": true,
35           },
36           "activeDeprecatedRuleCount": 2,
37           "activeRuleCount": 10,
38           "childrenCount": 0,
39           "depth": 1,
40           "isBuiltIn": false,
41           "isDefault": false,
42           "isInherited": false,
43           "key": "key",
44           "language": "js",
45           "languageName": "JavaScript",
46           "name": "name",
47           "organization": "foo",
48           "projectCount": 3,
49         },
50       ]
51     }
52     rule={
53       Object {
54         "isTemplate": false,
55         "key": "javascript:S1067",
56         "lang": "js",
57         "langName": "JavaScript",
58         "name": "Use foo",
59         "severity": "MAJOR",
60         "status": "READY",
61         "sysTags": Array [
62           "a",
63           "b",
64         ],
65         "tags": Array [
66           "x",
67         ],
68         "type": "CODE_SMELL",
69       }
70     }
71   />
72 </td>
73 `;
74
75 exports[`renderActions should render the deactivate button 1`] = `
76 <td
77   className="coding-rule-table-meta-cell coding-rule-activation-actions"
78 >
79   <ConfirmButton
80     confirmButtonText="yes"
81     modalBody="coding_rules.deactivate.confirm"
82     modalHeader="coding_rules.deactivate"
83     onConfirm={[Function]}
84   >
85     [Function]
86   </ConfirmButton>
87 </td>
88 `;
89
90 exports[`should render 1`] = `
91 <div
92   className="coding-rule"
93   data-rule="javascript:S1067"
94 >
95   <table
96     className="coding-rule-table"
97   >
98     <tbody>
99       <tr>
100         <td>
101           <div
102             className="coding-rule-title"
103           >
104             <Link
105               className="link-no-underline"
106               onClick={[Function]}
107               onlyActiveOnIndex={false}
108               style={Object {}}
109               to={
110                 Object {
111                   "pathname": "/organizations/org/rules",
112                   "query": Object {
113                     "open": "javascript:S1067",
114                     "rule_key": "javascript:S1067",
115                   },
116                 }
117               }
118             >
119               Use foo
120             </Link>
121           </div>
122         </td>
123         <td
124           className="coding-rule-table-meta-cell"
125         >
126           <div
127             className="display-flex-center coding-rule-meta"
128           >
129             <span
130               className="spacer-left note"
131             >
132               JavaScript
133             </span>
134             <Tooltip
135               overlay="coding_rules.type.tooltip.CODE_SMELL"
136             >
137               <span
138                 className="display-inline-flex-center spacer-left note"
139               >
140                 <IssueTypeIcon
141                   className="little-spacer-right"
142                   query="CODE_SMELL"
143                 />
144                 issue.type.CODE_SMELL
145               </span>
146             </Tooltip>
147             <TagsList
148               allowUpdate={false}
149               className="note spacer-left"
150               tags={
151                 Array [
152                   "x",
153                   "a",
154                   "b",
155                 ]
156               }
157             />
158             <SimilarRulesFilter
159               onFilterChange={[MockFunction]}
160               rule={
161                 Object {
162                   "key": "javascript:S1067",
163                   "lang": "js",
164                   "langName": "JavaScript",
165                   "name": "Use foo",
166                   "severity": "MAJOR",
167                   "status": "READY",
168                   "sysTags": Array [
169                     "a",
170                     "b",
171                   ],
172                   "tags": Array [
173                     "x",
174                   ],
175                   "type": "CODE_SMELL",
176                 }
177               }
178             />
179           </div>
180         </td>
181       </tr>
182     </tbody>
183   </table>
184 </div>
185 `;
186
187 exports[`should render deactivate button 1`] = `
188 <ConfirmButton
189   confirmButtonText="yes"
190   modalBody="coding_rules.deactivate.confirm"
191   modalHeader="coding_rules.deactivate"
192   onConfirm={[Function]}
193 >
194   [Function]
195 </ConfirmButton>
196 `;
197
198 exports[`should render deactivate button 2`] = `
199 <Tooltip
200   overlay="coding_rules.need_extend_or_copy"
201 >
202   <Button
203     className="coding-rules-detail-quality-profile-deactivate button-red"
204     disabled={true}
205   >
206     coding_rules.deactivate
207   </Button>
208 </Tooltip>
209 `;