]> source.dussan.org Git - sonarqube.git/blob
1f5b5388ac9fa3ccb22f7c7fbda85ab32b4815d3
[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   />
39   <div
40     className="issue-comment-age"
41   >
42     <DateFromNow
43       date="2017-03-01T09:36:01+0100"
44     />
45   </div>
46   <div
47     className="issue-comment-actions"
48   >
49     <div
50       className="dropdown"
51     >
52       <Toggler
53         closeOnClickOutside={false}
54         onRequestClose={[Function]}
55         open={false}
56         overlay={
57           <CommentPopup
58             comment={
59               Object {
60                 "author": "john.doe",
61                 "authorActive": true,
62                 "authorAvatar": "gravatarhash",
63                 "authorName": "John Doe",
64                 "createdAt": "2017-03-01T09:36:01+0100",
65                 "htmlText": "<b>test</b>",
66                 "key": "comment-key",
67                 "markdown": "*test*",
68                 "updatable": true,
69               }
70             }
71             onComment={[Function]}
72             placeholder=""
73             placement="bottom-right"
74             toggleComment={[Function]}
75           />
76         }
77       >
78         <EditButton
79           className="js-issue-comment-edit button-small"
80           onClick={[Function]}
81         />
82       </Toggler>
83     </div>
84     <div
85       className="dropdown"
86     >
87       <Toggler
88         onRequestClose={[Function]}
89         open={true}
90         overlay={
91           <CommentDeletePopup
92             onDelete={[Function]}
93           />
94         }
95       >
96         <DeleteButton
97           className="js-issue-comment-delete button-small"
98           onClick={[Function]}
99         />
100       </Toggler>
101     </div>
102   </div>
103 </div>
104 `;
105
106 exports[`should render correctly a comment that is not updatable 1`] = `
107 <div
108   className="issue-comment"
109 >
110   <div
111     className="issue-comment-author"
112     title="John Doe"
113   >
114     <Connect(Avatar)
115       className="little-spacer-right"
116       hash="gravatarhash"
117       name="John Doe"
118       size={16}
119     />
120     John Doe
121   </div>
122   <div
123     className="issue-comment-text markdown"
124     dangerouslySetInnerHTML={
125       Object {
126         "__html": "<b>test</b>",
127       }
128     }
129   />
130   <div
131     className="issue-comment-age"
132   >
133     <DateFromNow
134       date="2017-03-01T09:36:01+0100"
135     />
136   </div>
137   <div
138     className="issue-comment-actions"
139   />
140 </div>
141 `;
142
143 exports[`should render correctly a comment that is updatable 1`] = `
144 <div
145   className="issue-comment"
146 >
147   <div
148     className="issue-comment-author"
149     title="John Doe"
150   >
151     <Connect(Avatar)
152       className="little-spacer-right"
153       hash="gravatarhash"
154       name="John Doe"
155       size={16}
156     />
157     John Doe
158   </div>
159   <div
160     className="issue-comment-text markdown"
161     dangerouslySetInnerHTML={
162       Object {
163         "__html": "<b>test</b>",
164       }
165     }
166   />
167   <div
168     className="issue-comment-age"
169   >
170     <DateFromNow
171       date="2017-03-01T09:36:01+0100"
172     />
173   </div>
174   <div
175     className="issue-comment-actions"
176   >
177     <div
178       className="dropdown"
179     >
180       <Toggler
181         closeOnClickOutside={false}
182         onRequestClose={[Function]}
183         open={false}
184         overlay={
185           <CommentPopup
186             comment={
187               Object {
188                 "author": "john.doe",
189                 "authorActive": true,
190                 "authorAvatar": "gravatarhash",
191                 "authorName": "John Doe",
192                 "createdAt": "2017-03-01T09:36:01+0100",
193                 "htmlText": "<b>test</b>",
194                 "key": "comment-key",
195                 "markdown": "*test*",
196                 "updatable": true,
197               }
198             }
199             onComment={[Function]}
200             placeholder=""
201             placement="bottom-right"
202             toggleComment={[Function]}
203           />
204         }
205       >
206         <EditButton
207           className="js-issue-comment-edit button-small"
208           onClick={[Function]}
209         />
210       </Toggler>
211     </div>
212     <div
213       className="dropdown"
214     >
215       <Toggler
216         onRequestClose={[Function]}
217         open={false}
218         overlay={
219           <CommentDeletePopup
220             onDelete={[Function]}
221           />
222         }
223       >
224         <DeleteButton
225           className="js-issue-comment-delete button-small"
226           onClick={[Function]}
227         />
228       </Toggler>
229     </div>
230   </div>
231 </div>
232 `;
233
234 exports[`should render correctly a comment with a deleted author 1`] = `
235 <div
236   className="issue-comment-author"
237   title="user.x_deleted.john.doe"
238 >
239   <Connect(Avatar)
240     className="little-spacer-right"
241     hash="gravatarhash"
242     name="john.doe"
243     size={16}
244   />
245   user.x_deleted.john.doe
246 </div>
247 `;