]> source.dussan.org Git - sonarqube.git/blob
98241e10f0ca4bb10bb77f5480c61b38f1e9b206
[sonarqube.git] /
1 // Jest Snapshot v1, https://goo.gl/fbAQLP
2
3 exports[`should edit members 1`] = `
4 <EditMembers
5   group={
6     Object {
7       "id": 3,
8       "membersCount": 5,
9       "name": "Foo",
10     }
11   }
12   onEdit={[MockFunction]}
13   organization="org"
14 >
15   <ButtonIcon
16     className="button-small"
17     onClick={[Function]}
18   >
19     <Button
20       className="button-small button-icon"
21       onClick={[Function]}
22       stopPropagation={true}
23       style={
24         Object {
25           "color": "#236a97",
26         }
27       }
28     >
29       <button
30         className="button button-small button-icon"
31         onClick={[Function]}
32         style={
33           Object {
34             "color": "#236a97",
35           }
36         }
37         type="button"
38       >
39         <MOCKBulletListIcon />
40       </button>
41     </Button>
42   </ButtonIcon>
43 </EditMembers>
44 `;
45
46 exports[`should edit members 2`] = `
47 <EditMembers
48   group={
49     Object {
50       "id": 3,
51       "membersCount": 5,
52       "name": "Foo",
53     }
54   }
55   onEdit={[MockFunction]}
56   organization="org"
57 >
58   <ButtonIcon
59     className="button-small"
60     onClick={[Function]}
61   >
62     <Button
63       className="button-small button-icon"
64       onClick={[Function]}
65       stopPropagation={true}
66       style={
67         Object {
68           "color": "#236a97",
69         }
70       }
71     >
72       <button
73         className="button button-small button-icon"
74         onClick={[Function]}
75         style={
76           Object {
77             "color": "#236a97",
78           }
79         }
80         type="button"
81       >
82         <MOCKBulletListIcon />
83       </button>
84     </Button>
85   </ButtonIcon>
86   <EditMembers
87     group={
88       Object {
89         "id": 3,
90         "membersCount": 5,
91         "name": "Foo",
92       }
93     }
94     onClose={[Function]}
95     organization="org"
96   >
97     <Modal
98       contentLabel="users.update"
99       onRequestClose={[Function]}
100     >
101       <Modal
102         ariaHideApp={true}
103         bodyOpenClassName="ReactModal__Body--open"
104         className="modal"
105         closeTimeoutMS={0}
106         contentLabel="users.update"
107         isOpen={true}
108         onRequestClose={[Function]}
109         overlayClassName="modal-overlay"
110         parentSelector={[Function]}
111         portalClassName="ReactModalPortal"
112         role="dialog"
113         shouldCloseOnEsc={true}
114         shouldCloseOnOverlayClick={true}
115         shouldFocusAfterRender={true}
116         shouldReturnFocusAfterClose={true}
117       >
118         <Portal
119           containerInfo={
120             <div
121               class="ReactModalPortal"
122             >
123               <div
124                 class="ReactModal__Overlay ReactModal__Overlay--after-open modal-overlay"
125               >
126                 <div
127                   aria-label="users.update"
128                   class="ReactModal__Content ReactModal__Content--after-open modal"
129                   role="dialog"
130                   tabindex="-1"
131                 >
132                   <header
133                     class="modal-head"
134                   >
135                     <h2>
136                       users.update
137                     </h2>
138                   </header>
139                   <div
140                     class="modal-body"
141                   >
142                     <div
143                       class="select-list"
144                     >
145                       <div
146                         class="display-flex-center"
147                       >
148                         <ul
149                           class="radio-toggle spacer-right"
150                         >
151                           <li>
152                             <input
153                               checked=""
154                               id="filter__selected"
155                               name="filter"
156                               type="radio"
157                               value="selected"
158                             />
159                             <label
160                               for="filter__selected"
161                             >
162                               selected
163                             </label>
164                           </li>
165                           <li>
166                             <input
167                               id="filter__deselected"
168                               name="filter"
169                               type="radio"
170                               value="deselected"
171                             />
172                             <label
173                               for="filter__deselected"
174                             >
175                               unselected
176                             </label>
177                           </li>
178                           <li>
179                             <input
180                               id="filter__all"
181                               name="filter"
182                               type="radio"
183                               value="all"
184                             />
185                             <label
186                               for="filter__all"
187                             >
188                               all
189                             </label>
190                           </li>
191                         </ul>
192                         <div
193                           class="search-box"
194                           title=""
195                         >
196                           <input
197                             aria-label="search_verb"
198                             autocomplete="off"
199                             class="search-box-input"
200                             maxlength="100"
201                             placeholder="search_verb"
202                             type="search"
203                             value=""
204                           />
205                           
206                         </div>
207                       </div>
208                       <div
209                         class="select-list-list-container spacer-top"
210                       >
211                         <ul
212                           class="menu"
213                         />
214                       </div>
215                     </div>
216                   </div>
217                   <footer
218                     class="modal-foot"
219                   >
220                     <button
221                       class="button button-link"
222                       type="reset"
223                     >
224                       Done
225                     </button>
226                   </footer>
227                 </div>
228               </div>
229             </div>
230           }
231         >
232           <ModalPortal
233             ariaHideApp={true}
234             bodyOpenClassName="ReactModal__Body--open"
235             className="modal"
236             closeTimeoutMS={0}
237             contentLabel="users.update"
238             defaultStyles={
239               Object {
240                 "content": Object {
241                   "WebkitOverflowScrolling": "touch",
242                   "background": "#fff",
243                   "border": "1px solid #ccc",
244                   "borderRadius": "4px",
245                   "bottom": "40px",
246                   "left": "40px",
247                   "outline": "none",
248                   "overflow": "auto",
249                   "padding": "20px",
250                   "position": "absolute",
251                   "right": "40px",
252                   "top": "40px",
253                 },
254                 "overlay": Object {
255                   "backgroundColor": "rgba(255, 255, 255, 0.75)",
256                   "bottom": 0,
257                   "left": 0,
258                   "position": "fixed",
259                   "right": 0,
260                   "top": 0,
261                 },
262               }
263             }
264             isOpen={true}
265             onRequestClose={[Function]}
266             overlayClassName="modal-overlay"
267             parentSelector={[Function]}
268             portalClassName="ReactModalPortal"
269             role="dialog"
270             shouldCloseOnEsc={true}
271             shouldCloseOnOverlayClick={true}
272             shouldFocusAfterRender={true}
273             shouldReturnFocusAfterClose={true}
274             style={
275               Object {
276                 "content": Object {},
277                 "overlay": Object {},
278               }
279             }
280           >
281             <div
282               className="ReactModal__Overlay ReactModal__Overlay--after-open modal-overlay"
283               onClick={[Function]}
284               onMouseDown={[Function]}
285               style={Object {}}
286             >
287               <div
288                 aria-label="users.update"
289                 className="ReactModal__Content ReactModal__Content--after-open modal"
290                 onClick={[Function]}
291                 onKeyDown={[Function]}
292                 onMouseDown={[Function]}
293                 onMouseUp={[Function]}
294                 role="dialog"
295                 style={Object {}}
296                 tabIndex="-1"
297               >
298                 <header
299                   className="modal-head"
300                 >
301                   <h2>
302                     users.update
303                   </h2>
304                 </header>
305                 <div
306                   className="modal-body"
307                 >
308                   <DeferredSpinner
309                     loading={true}
310                     timeout={100}
311                   >
312                     <SelectList
313                       elements={Array []}
314                       onSearch={[Function]}
315                       onSelect={[Function]}
316                       onUnselect={[Function]}
317                       renderElement={[Function]}
318                       selectedElements={Array []}
319                     >
320                       <div
321                         className="select-list"
322                       >
323                         <div
324                           className="display-flex-center"
325                         >
326                           <RadioToggle
327                             className="spacer-right"
328                             disabled={false}
329                             name="filter"
330                             onCheck={[Function]}
331                             options={
332                               Array [
333                                 Object {
334                                   "disabled": false,
335                                   "label": "selected",
336                                   "value": "selected",
337                                 },
338                                 Object {
339                                   "disabled": false,
340                                   "label": "unselected",
341                                   "value": "deselected",
342                                 },
343                                 Object {
344                                   "disabled": false,
345                                   "label": "all",
346                                   "value": "all",
347                                 },
348                               ]
349                             }
350                             value="selected"
351                           >
352                             <ul
353                               className="radio-toggle spacer-right"
354                             >
355                               <li
356                                 key="selected"
357                               >
358                                 <input
359                                   checked={true}
360                                   disabled={false}
361                                   id="filter__selected"
362                                   name="filter"
363                                   onChange={[Function]}
364                                   type="radio"
365                                   value="selected"
366                                 />
367                                 <Tooltip>
368                                   <label
369                                     htmlFor="filter__selected"
370                                   >
371                                     selected
372                                   </label>
373                                 </Tooltip>
374                               </li>
375                               <li
376                                 key="deselected"
377                               >
378                                 <input
379                                   checked={false}
380                                   disabled={false}
381                                   id="filter__deselected"
382                                   name="filter"
383                                   onChange={[Function]}
384                                   type="radio"
385                                   value="deselected"
386                                 />
387                                 <Tooltip>
388                                   <label
389                                     htmlFor="filter__deselected"
390                                   >
391                                     unselected
392                                   </label>
393                                 </Tooltip>
394                               </li>
395                               <li
396                                 key="all"
397                               >
398                                 <input
399                                   checked={false}
400                                   disabled={false}
401                                   id="filter__all"
402                                   name="filter"
403                                   onChange={[Function]}
404                                   type="radio"
405                                   value="all"
406                                 />
407                                 <Tooltip>
408                                   <label
409                                     htmlFor="filter__all"
410                                   >
411                                     all
412                                   </label>
413                                 </Tooltip>
414                               </li>
415                             </ul>
416                           </RadioToggle>
417                           <SearchBox
418                             autoFocus={true}
419                             loading={false}
420                             onChange={[Function]}
421                             placeholder="search_verb"
422                             value=""
423                           >
424                             <div
425                               className="search-box"
426                               title=""
427                             >
428                               <input
429                                 aria-label="search_verb"
430                                 autoComplete="off"
431                                 autoFocus={true}
432                                 className="search-box-input"
433                                 maxLength={100}
434                                 onChange={[Function]}
435                                 onKeyDown={[Function]}
436                                 placeholder="search_verb"
437                                 type="search"
438                                 value=""
439                               />
440                               <DeferredSpinner
441                                 loading={false}
442                                 timeout={100}
443                               >
444                                 <MOCKSearchIcon
445                                   className="search-box-magnifier"
446                                 />
447                               </DeferredSpinner>
448                             </div>
449                           </SearchBox>
450                         </div>
451                         <SelectListListContainer
452                           disabledElements={Array []}
453                           elements={Array []}
454                           filter="selected"
455                           onSelect={[Function]}
456                           onUnselect={[Function]}
457                           renderElement={[Function]}
458                           selectedElements={Array []}
459                         >
460                           <div
461                             className="select-list-list-container spacer-top"
462                           >
463                             <ul
464                               className="menu"
465                             />
466                           </div>
467                         </SelectListListContainer>
468                       </div>
469                     </SelectList>
470                   </DeferredSpinner>
471                 </div>
472                 <footer
473                   className="modal-foot"
474                 >
475                   <ResetButtonLink
476                     onClick={[Function]}
477                   >
478                     <ButtonLink
479                       onClick={[Function]}
480                       type="reset"
481                     >
482                       <Button
483                         className="button-link"
484                         onClick={[Function]}
485                         type="reset"
486                       >
487                         <button
488                           className="button button-link"
489                           onClick={[Function]}
490                           type="reset"
491                         >
492                           Done
493                         </button>
494                       </Button>
495                     </ButtonLink>
496                   </ResetButtonLink>
497                 </footer>
498               </div>
499             </div>
500           </ModalPortal>
501         </Portal>
502       </Modal>
503     </Modal>
504   </EditMembers>
505 </EditMembers>
506 `;
507
508 exports[`should edit members 3`] = `
509 <EditMembers
510   group={
511     Object {
512       "id": 3,
513       "membersCount": 5,
514       "name": "Foo",
515     }
516   }
517   onEdit={
518     [MockFunction] {
519       "calls": Array [
520         Array [],
521       ],
522       "results": Array [
523         Object {
524           "type": "return",
525           "value": undefined,
526         },
527       ],
528     }
529   }
530   organization="org"
531 >
532   <ButtonIcon
533     className="button-small"
534     onClick={[Function]}
535   >
536     <Button
537       className="button-small button-icon"
538       onClick={[Function]}
539       stopPropagation={true}
540       style={
541         Object {
542           "color": "#236a97",
543         }
544       }
545     >
546       <button
547         className="button button-small button-icon"
548         onClick={[Function]}
549         style={
550           Object {
551             "color": "#236a97",
552           }
553         }
554         type="button"
555       >
556         <MOCKBulletListIcon />
557       </button>
558     </Button>
559   </ButtonIcon>
560 </EditMembers>
561 `;