]> source.dussan.org Git - sonarqube.git/blob
a2651397affa0ee70e737cc49e05342eb24df3aa
[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                       needReload={false}
315                       onLoadMore={[Function]}
316                       onReload={[Function]}
317                       onSearch={[Function]}
318                       onSelect={[Function]}
319                       onUnselect={[Function]}
320                       renderElement={[Function]}
321                       selectedElements={Array []}
322                     >
323                       <div
324                         className="select-list"
325                       >
326                         <div
327                           className="display-flex-center"
328                         >
329                           <RadioToggle
330                             className="spacer-right"
331                             disabled={false}
332                             name="filter"
333                             onCheck={[Function]}
334                             options={
335                               Array [
336                                 Object {
337                                   "disabled": false,
338                                   "label": "selected",
339                                   "value": "selected",
340                                 },
341                                 Object {
342                                   "disabled": false,
343                                   "label": "unselected",
344                                   "value": "deselected",
345                                 },
346                                 Object {
347                                   "disabled": false,
348                                   "label": "all",
349                                   "value": "all",
350                                 },
351                               ]
352                             }
353                             value="selected"
354                           >
355                             <ul
356                               className="radio-toggle spacer-right"
357                             >
358                               <li
359                                 key="selected"
360                               >
361                                 <input
362                                   checked={true}
363                                   disabled={false}
364                                   id="filter__selected"
365                                   name="filter"
366                                   onChange={[Function]}
367                                   type="radio"
368                                   value="selected"
369                                 />
370                                 <Tooltip>
371                                   <label
372                                     htmlFor="filter__selected"
373                                   >
374                                     selected
375                                   </label>
376                                 </Tooltip>
377                               </li>
378                               <li
379                                 key="deselected"
380                               >
381                                 <input
382                                   checked={false}
383                                   disabled={false}
384                                   id="filter__deselected"
385                                   name="filter"
386                                   onChange={[Function]}
387                                   type="radio"
388                                   value="deselected"
389                                 />
390                                 <Tooltip>
391                                   <label
392                                     htmlFor="filter__deselected"
393                                   >
394                                     unselected
395                                   </label>
396                                 </Tooltip>
397                               </li>
398                               <li
399                                 key="all"
400                               >
401                                 <input
402                                   checked={false}
403                                   disabled={false}
404                                   id="filter__all"
405                                   name="filter"
406                                   onChange={[Function]}
407                                   type="radio"
408                                   value="all"
409                                 />
410                                 <Tooltip>
411                                   <label
412                                     htmlFor="filter__all"
413                                   >
414                                     all
415                                   </label>
416                                 </Tooltip>
417                               </li>
418                             </ul>
419                           </RadioToggle>
420                           <SearchBox
421                             autoFocus={true}
422                             loading={false}
423                             onChange={[Function]}
424                             placeholder="search_verb"
425                             value=""
426                           >
427                             <div
428                               className="search-box"
429                               title=""
430                             >
431                               <input
432                                 aria-label="search_verb"
433                                 autoComplete="off"
434                                 autoFocus={true}
435                                 className="search-box-input"
436                                 maxLength={100}
437                                 onChange={[Function]}
438                                 onKeyDown={[Function]}
439                                 placeholder="search_verb"
440                                 type="search"
441                                 value=""
442                               />
443                               <DeferredSpinner
444                                 loading={false}
445                                 timeout={100}
446                               >
447                                 <MOCKSearchIcon
448                                   className="search-box-magnifier"
449                                 />
450                               </DeferredSpinner>
451                             </div>
452                           </SearchBox>
453                         </div>
454                         <SelectListListContainer
455                           disabledElements={Array []}
456                           elements={Array []}
457                           filter="selected"
458                           onSelect={[Function]}
459                           onUnselect={[Function]}
460                           renderElement={[Function]}
461                           selectedElements={Array []}
462                         >
463                           <div
464                             className="select-list-list-container spacer-top"
465                           >
466                             <ul
467                               className="menu"
468                             />
469                           </div>
470                         </SelectListListContainer>
471                       </div>
472                     </SelectList>
473                   </DeferredSpinner>
474                 </div>
475                 <footer
476                   className="modal-foot"
477                 >
478                   <ResetButtonLink
479                     onClick={[Function]}
480                   >
481                     <ButtonLink
482                       onClick={[Function]}
483                       type="reset"
484                     >
485                       <Button
486                         className="button-link"
487                         onClick={[Function]}
488                         type="reset"
489                       >
490                         <button
491                           className="button button-link"
492                           onClick={[Function]}
493                           type="reset"
494                         >
495                           Done
496                         </button>
497                       </Button>
498                     </ButtonLink>
499                   </ResetButtonLink>
500                 </footer>
501               </div>
502             </div>
503           </ModalPortal>
504         </Portal>
505       </Modal>
506     </Modal>
507   </EditMembers>
508 </EditMembers>
509 `;
510
511 exports[`should edit members 3`] = `
512 <EditMembers
513   group={
514     Object {
515       "id": 3,
516       "membersCount": 5,
517       "name": "Foo",
518     }
519   }
520   onEdit={
521     [MockFunction] {
522       "calls": Array [
523         Array [],
524       ],
525       "results": Array [
526         Object {
527           "type": "return",
528           "value": undefined,
529         },
530       ],
531     }
532   }
533   organization="org"
534 >
535   <ButtonIcon
536     className="button-small"
537     onClick={[Function]}
538   >
539     <Button
540       className="button-small button-icon"
541       onClick={[Function]}
542       stopPropagation={true}
543       style={
544         Object {
545           "color": "#236a97",
546         }
547       }
548     >
549       <button
550         className="button button-small button-icon"
551         onClick={[Function]}
552         style={
553           Object {
554             "color": "#236a97",
555           }
556         }
557         type="button"
558       >
559         <MOCKBulletListIcon />
560       </button>
561     </Button>
562   </ButtonIcon>
563 </EditMembers>
564 `;