]> source.dussan.org Git - sonarqube.git/blob
a3b7b63d015656aed346648e05c3a16363ffe441
[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 Object {
5   "openPopup": "edit",
6 }
7 `;
8
9 exports[`should open the right popups when the buttons are clicked 2`] = `
10 Object {
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     <Connect(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       Object {
35         "__html": "<b>test</b>",
36       }
37     }
38     onClick={[Function]}
39     role="Listitem"
40     tabIndex={0}
41   />
42   <div
43     className="issue-comment-age"
44   >
45     <FormattedRelative
46       updateInterval={10000}
47       value="2017-03-01T09:36:01+0100"
48     />
49   </div>
50   <div
51     className="issue-comment-actions"
52   >
53     <BubblePopupHelper
54       className="bubble-popup-helper-inline"
55       isOpen={false}
56       offset={
57         Object {
58           "horizontal": -6,
59           "vertical": 0,
60         }
61       }
62       popup={
63         <CommentPopup
64           comment={
65             Object {
66               "authorAvatar": "gravatarhash",
67               "authorName": "John Doe",
68               "createdAt": "2017-03-01T09:36:01+0100",
69               "htmlText": "<b>test</b>",
70               "key": "comment-key",
71               "updatable": true,
72             }
73           }
74           customClass="issue-edit-comment-bubble-popup"
75           onComment={[Function]}
76           placeholder=""
77           toggleComment={[Function]}
78         />
79       }
80       position="bottomright"
81       togglePopup={[Function]}
82     >
83       <button
84         className="js-issue-comment-edit button-link icon-edit icon-half-transparent"
85         onClick={[Function]}
86       />
87     </BubblePopupHelper>
88     <BubblePopupHelper
89       className="bubble-popup-helper-inline"
90       isOpen={true}
91       offset={
92         Object {
93           "horizontal": -10,
94           "vertical": 0,
95         }
96       }
97       popup={
98         <CommentDeletePopup
99           onDelete={[Function]}
100         />
101       }
102       position="bottomright"
103       togglePopup={[Function]}
104     >
105       <button
106         className="js-issue-comment-delete button-link icon-delete icon-half-transparent"
107         onClick={[Function]}
108       />
109     </BubblePopupHelper>
110   </div>
111 </div>
112 `;
113
114 exports[`should render correctly a comment that is not updatable 1`] = `
115 <div
116   className="issue-comment"
117 >
118   <div
119     className="issue-comment-author"
120     title="John Doe"
121   >
122     <Connect(Avatar)
123       className="little-spacer-right"
124       hash="gravatarhash"
125       name="John Doe"
126       size={16}
127     />
128     John Doe
129   </div>
130   <div
131     className="issue-comment-text markdown"
132     dangerouslySetInnerHTML={
133       Object {
134         "__html": "<b>test</b>",
135       }
136     }
137     onClick={[Function]}
138     role="Listitem"
139     tabIndex={0}
140   />
141   <div
142     className="issue-comment-age"
143   >
144     <FormattedRelative
145       updateInterval={10000}
146       value="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     <Connect(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       Object {
175         "__html": "<b>test</b>",
176       }
177     }
178     onClick={[Function]}
179     role="Listitem"
180     tabIndex={0}
181   />
182   <div
183     className="issue-comment-age"
184   >
185     <FormattedRelative
186       updateInterval={10000}
187       value="2017-03-01T09:36:01+0100"
188     />
189   </div>
190   <div
191     className="issue-comment-actions"
192   >
193     <BubblePopupHelper
194       className="bubble-popup-helper-inline"
195       isOpen={false}
196       offset={
197         Object {
198           "horizontal": -6,
199           "vertical": 0,
200         }
201       }
202       popup={
203         <CommentPopup
204           comment={
205             Object {
206               "authorAvatar": "gravatarhash",
207               "authorName": "John Doe",
208               "createdAt": "2017-03-01T09:36:01+0100",
209               "htmlText": "<b>test</b>",
210               "key": "comment-key",
211               "updatable": true,
212             }
213           }
214           customClass="issue-edit-comment-bubble-popup"
215           onComment={[Function]}
216           placeholder=""
217           toggleComment={[Function]}
218         />
219       }
220       position="bottomright"
221       togglePopup={[Function]}
222     >
223       <button
224         className="js-issue-comment-edit button-link icon-edit icon-half-transparent"
225         onClick={[Function]}
226       />
227     </BubblePopupHelper>
228     <BubblePopupHelper
229       className="bubble-popup-helper-inline"
230       isOpen={false}
231       offset={
232         Object {
233           "horizontal": -10,
234           "vertical": 0,
235         }
236       }
237       popup={
238         <CommentDeletePopup
239           onDelete={[Function]}
240         />
241       }
242       position="bottomright"
243       togglePopup={[Function]}
244     >
245       <button
246         className="js-issue-comment-delete button-link icon-delete icon-half-transparent"
247         onClick={[Function]}
248       />
249     </BubblePopupHelper>
250   </div>
251 </div>
252 `;