]> source.dussan.org Git - sonarqube.git/blob
563f86aac2977a5bd0bf20c664837c82913013c6
[sonarqube.git] /
1 // Jest Snapshot v1, https://goo.gl/fbAQLP
2
3 exports[`should open the right popups when the buttons are clicked 1`] = `
4 {
5   "openPopup": "edit",
6 }
7 `;
8
9 exports[`should open the right popups when the buttons are clicked 2`] = `
10 {
11   "openPopup": "delete",
12 }
13 `;
14
15 exports[`should open the right popups when the buttons are clicked 3`] = `
16 <div
17   className="issue-comment"
18 >
19   <div
20     className="issue-comment-author"
21     title="John Doe"
22   >
23     <withAppStateContext(Avatar)
24       className="little-spacer-right"
25       hash="gravatarhash"
26       name="John Doe"
27       size={16}
28     />
29     John Doe
30   </div>
31   <div
32     className="issue-comment-text markdown"
33     dangerouslySetInnerHTML={
34       {
35         "__html": "<b>test</b>",
36       }
37     }
38   />
39   <div
40     className="issue-comment-age"
41   >
42     <span
43       className="a11y-hidden"
44     >
45       issue.comment.posted_on
46     </span>
47     <DateFromNow
48       date="2017-03-01T09:36:01+0100"
49     />
50   </div>
51   <div
52     className="issue-comment-actions"
53   >
54     <div
55       className="dropdown"
56     >
57       <Toggler
58         closeOnClickOutside={false}
59         onRequestClose={[Function]}
60         open={false}
61         overlay={
62           <CommentPopup
63             comment={
64               {
65                 "author": "john.doe",
66                 "authorActive": true,
67                 "authorAvatar": "gravatarhash",
68                 "authorName": "John Doe",
69                 "createdAt": "2017-03-01T09:36:01+0100",
70                 "htmlText": "<b>test</b>",
71                 "key": "comment-key",
72                 "markdown": "*test*",
73                 "updatable": true,
74               }
75             }
76             onComment={[Function]}
77             placeholder=""
78             placement="bottom-right"
79             toggleComment={[Function]}
80           />
81         }
82       >
83         <EditButton
84           aria-label="issue.comment.edit"
85           className="js-issue-comment-edit button-small"
86           onClick={[Function]}
87         />
88       </Toggler>
89     </div>
90     <div
91       className="dropdown"
92     >
93       <Toggler
94         onRequestClose={[Function]}
95         open={true}
96         overlay={
97           <CommentDeletePopup
98             onDelete={[Function]}
99           />
100         }
101       >
102         <DeleteButton
103           aria-label="issue.comment.delete"
104           className="js-issue-comment-delete button-small"
105           onClick={[Function]}
106         />
107       </Toggler>
108     </div>
109   </div>
110 </div>
111 `;
112
113 exports[`should render correctly a comment that is not updatable 1`] = `
114 <div
115   className="issue-comment"
116 >
117   <div
118     className="issue-comment-author"
119     title="John Doe"
120   >
121     <withAppStateContext(Avatar)
122       className="little-spacer-right"
123       hash="gravatarhash"
124       name="John Doe"
125       size={16}
126     />
127     John Doe
128   </div>
129   <div
130     className="issue-comment-text markdown"
131     dangerouslySetInnerHTML={
132       {
133         "__html": "<b>test</b>",
134       }
135     }
136   />
137   <div
138     className="issue-comment-age"
139   >
140     <span
141       className="a11y-hidden"
142     >
143       issue.comment.posted_on
144     </span>
145     <DateFromNow
146       date="2017-03-01T09:36:01+0100"
147     />
148   </div>
149   <div
150     className="issue-comment-actions"
151   />
152 </div>
153 `;
154
155 exports[`should render correctly a comment that is updatable 1`] = `
156 <div
157   className="issue-comment"
158 >
159   <div
160     className="issue-comment-author"
161     title="John Doe"
162   >
163     <withAppStateContext(Avatar)
164       className="little-spacer-right"
165       hash="gravatarhash"
166       name="John Doe"
167       size={16}
168     />
169     John Doe
170   </div>
171   <div
172     className="issue-comment-text markdown"
173     dangerouslySetInnerHTML={
174       {
175         "__html": "<b>test</b>",
176       }
177     }
178   />
179   <div
180     className="issue-comment-age"
181   >
182     <span
183       className="a11y-hidden"
184     >
185       issue.comment.posted_on
186     </span>
187     <DateFromNow
188       date="2017-03-01T09:36:01+0100"
189     />
190   </div>
191   <div
192     className="issue-comment-actions"
193   >
194     <div
195       className="dropdown"
196     >
197       <Toggler
198         closeOnClickOutside={false}
199         onRequestClose={[Function]}
200         open={false}
201         overlay={
202           <CommentPopup
203             comment={
204               {
205                 "author": "john.doe",
206                 "authorActive": true,
207                 "authorAvatar": "gravatarhash",
208                 "authorName": "John Doe",
209                 "createdAt": "2017-03-01T09:36:01+0100",
210                 "htmlText": "<b>test</b>",
211                 "key": "comment-key",
212                 "markdown": "*test*",
213                 "updatable": true,
214               }
215             }
216             onComment={[Function]}
217             placeholder=""
218             placement="bottom-right"
219             toggleComment={[Function]}
220           />
221         }
222       >
223         <EditButton
224           aria-label="issue.comment.edit"
225           className="js-issue-comment-edit button-small"
226           onClick={[Function]}
227         />
228       </Toggler>
229     </div>
230     <div
231       className="dropdown"
232     >
233       <Toggler
234         onRequestClose={[Function]}
235         open={false}
236         overlay={
237           <CommentDeletePopup
238             onDelete={[Function]}
239           />
240         }
241       >
242         <DeleteButton
243           aria-label="issue.comment.delete"
244           className="js-issue-comment-delete button-small"
245           onClick={[Function]}
246         />
247       </Toggler>
248     </div>
249   </div>
250 </div>
251 `;
252
253 exports[`should render correctly a comment with a deleted author 1`] = `
254 <div
255   className="issue-comment-author"
256   title="user.x_deleted.john.doe"
257 >
258   <withAppStateContext(Avatar)
259     className="little-spacer-right"
260     hash="gravatarhash"
261     name="john.doe"
262     size={16}
263   />
264   user.x_deleted.john.doe
265 </div>
266 `;