TeamList.test.tsx.snap 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602
  1. // Jest Snapshot v1, https://goo.gl/fbAQLP
  2. exports[`Render should render component 1`] = `
  3. <Page
  4. navModel={
  5. Object {
  6. "main": Object {
  7. "text": "Configuration",
  8. },
  9. "node": Object {
  10. "text": "Team List",
  11. },
  12. }
  13. }
  14. >
  15. <PageContents
  16. isLoading={true}
  17. />
  18. </Page>
  19. `;
  20. exports[`Render should render teams table 1`] = `
  21. <Page
  22. navModel={
  23. Object {
  24. "main": Object {
  25. "text": "Configuration",
  26. },
  27. "node": Object {
  28. "text": "Team List",
  29. },
  30. }
  31. }
  32. >
  33. <PageContents
  34. isLoading={false}
  35. >
  36. <div
  37. className="page-action-bar"
  38. >
  39. <div
  40. className="gf-form gf-form--grow"
  41. >
  42. <ForwardRef
  43. inputClassName="gf-form-input"
  44. labelClassName="gf-form--has-input-icon gf-form--grow"
  45. onChange={[Function]}
  46. placeholder="Search teams"
  47. value=""
  48. />
  49. </div>
  50. <div
  51. className="page-action-bar__spacer"
  52. />
  53. <a
  54. className="btn btn-primary"
  55. href="org/teams/new"
  56. >
  57. New team
  58. </a>
  59. </div>
  60. <div
  61. className="admin-list-table"
  62. >
  63. <table
  64. className="filter-table filter-table--hover form-inline"
  65. >
  66. <thead>
  67. <tr>
  68. <th />
  69. <th>
  70. Name
  71. </th>
  72. <th>
  73. Email
  74. </th>
  75. <th>
  76. Members
  77. </th>
  78. <th
  79. style={
  80. Object {
  81. "width": "1%",
  82. }
  83. }
  84. />
  85. </tr>
  86. </thead>
  87. <tbody>
  88. <tr
  89. key="1"
  90. >
  91. <td
  92. className="width-4 text-center link-td"
  93. >
  94. <a
  95. href="org/teams/edit/1"
  96. >
  97. <img
  98. className="filter-table__avatar"
  99. src="some/url/"
  100. />
  101. </a>
  102. </td>
  103. <td
  104. className="link-td"
  105. >
  106. <a
  107. href="org/teams/edit/1"
  108. >
  109. test-1
  110. </a>
  111. </td>
  112. <td
  113. className="link-td"
  114. >
  115. <a
  116. href="org/teams/edit/1"
  117. >
  118. test-1@test.com
  119. </a>
  120. </td>
  121. <td
  122. className="link-td"
  123. >
  124. <a
  125. href="org/teams/edit/1"
  126. >
  127. 1
  128. </a>
  129. </td>
  130. <td
  131. className="text-right"
  132. >
  133. <DeleteButton
  134. disabled={false}
  135. onConfirm={[Function]}
  136. />
  137. </td>
  138. </tr>
  139. <tr
  140. key="2"
  141. >
  142. <td
  143. className="width-4 text-center link-td"
  144. >
  145. <a
  146. href="org/teams/edit/2"
  147. >
  148. <img
  149. className="filter-table__avatar"
  150. src="some/url/"
  151. />
  152. </a>
  153. </td>
  154. <td
  155. className="link-td"
  156. >
  157. <a
  158. href="org/teams/edit/2"
  159. >
  160. test-2
  161. </a>
  162. </td>
  163. <td
  164. className="link-td"
  165. >
  166. <a
  167. href="org/teams/edit/2"
  168. >
  169. test-2@test.com
  170. </a>
  171. </td>
  172. <td
  173. className="link-td"
  174. >
  175. <a
  176. href="org/teams/edit/2"
  177. >
  178. 2
  179. </a>
  180. </td>
  181. <td
  182. className="text-right"
  183. >
  184. <DeleteButton
  185. disabled={false}
  186. onConfirm={[Function]}
  187. />
  188. </td>
  189. </tr>
  190. <tr
  191. key="3"
  192. >
  193. <td
  194. className="width-4 text-center link-td"
  195. >
  196. <a
  197. href="org/teams/edit/3"
  198. >
  199. <img
  200. className="filter-table__avatar"
  201. src="some/url/"
  202. />
  203. </a>
  204. </td>
  205. <td
  206. className="link-td"
  207. >
  208. <a
  209. href="org/teams/edit/3"
  210. >
  211. test-3
  212. </a>
  213. </td>
  214. <td
  215. className="link-td"
  216. >
  217. <a
  218. href="org/teams/edit/3"
  219. >
  220. test-3@test.com
  221. </a>
  222. </td>
  223. <td
  224. className="link-td"
  225. >
  226. <a
  227. href="org/teams/edit/3"
  228. >
  229. 3
  230. </a>
  231. </td>
  232. <td
  233. className="text-right"
  234. >
  235. <DeleteButton
  236. disabled={false}
  237. onConfirm={[Function]}
  238. />
  239. </td>
  240. </tr>
  241. <tr
  242. key="4"
  243. >
  244. <td
  245. className="width-4 text-center link-td"
  246. >
  247. <a
  248. href="org/teams/edit/4"
  249. >
  250. <img
  251. className="filter-table__avatar"
  252. src="some/url/"
  253. />
  254. </a>
  255. </td>
  256. <td
  257. className="link-td"
  258. >
  259. <a
  260. href="org/teams/edit/4"
  261. >
  262. test-4
  263. </a>
  264. </td>
  265. <td
  266. className="link-td"
  267. >
  268. <a
  269. href="org/teams/edit/4"
  270. >
  271. test-4@test.com
  272. </a>
  273. </td>
  274. <td
  275. className="link-td"
  276. >
  277. <a
  278. href="org/teams/edit/4"
  279. >
  280. 4
  281. </a>
  282. </td>
  283. <td
  284. className="text-right"
  285. >
  286. <DeleteButton
  287. disabled={false}
  288. onConfirm={[Function]}
  289. />
  290. </td>
  291. </tr>
  292. <tr
  293. key="5"
  294. >
  295. <td
  296. className="width-4 text-center link-td"
  297. >
  298. <a
  299. href="org/teams/edit/5"
  300. >
  301. <img
  302. className="filter-table__avatar"
  303. src="some/url/"
  304. />
  305. </a>
  306. </td>
  307. <td
  308. className="link-td"
  309. >
  310. <a
  311. href="org/teams/edit/5"
  312. >
  313. test-5
  314. </a>
  315. </td>
  316. <td
  317. className="link-td"
  318. >
  319. <a
  320. href="org/teams/edit/5"
  321. >
  322. test-5@test.com
  323. </a>
  324. </td>
  325. <td
  326. className="link-td"
  327. >
  328. <a
  329. href="org/teams/edit/5"
  330. >
  331. 5
  332. </a>
  333. </td>
  334. <td
  335. className="text-right"
  336. >
  337. <DeleteButton
  338. disabled={false}
  339. onConfirm={[Function]}
  340. />
  341. </td>
  342. </tr>
  343. </tbody>
  344. </table>
  345. </div>
  346. </PageContents>
  347. </Page>
  348. `;
  349. exports[`Render when feature toggle editorsCanAdmin is turned on and signedin user is a viewer should disable the new team button 1`] = `
  350. <Page
  351. navModel={
  352. Object {
  353. "main": Object {
  354. "text": "Configuration",
  355. },
  356. "node": Object {
  357. "text": "Team List",
  358. },
  359. }
  360. }
  361. >
  362. <PageContents
  363. isLoading={false}
  364. >
  365. <div
  366. className="page-action-bar"
  367. >
  368. <div
  369. className="gf-form gf-form--grow"
  370. >
  371. <ForwardRef
  372. inputClassName="gf-form-input"
  373. labelClassName="gf-form--has-input-icon gf-form--grow"
  374. onChange={[Function]}
  375. placeholder="Search teams"
  376. value=""
  377. />
  378. </div>
  379. <div
  380. className="page-action-bar__spacer"
  381. />
  382. <a
  383. className="btn btn-primary disabled"
  384. href="#"
  385. >
  386. New team
  387. </a>
  388. </div>
  389. <div
  390. className="admin-list-table"
  391. >
  392. <table
  393. className="filter-table filter-table--hover form-inline"
  394. >
  395. <thead>
  396. <tr>
  397. <th />
  398. <th>
  399. Name
  400. </th>
  401. <th>
  402. Email
  403. </th>
  404. <th>
  405. Members
  406. </th>
  407. <th
  408. style={
  409. Object {
  410. "width": "1%",
  411. }
  412. }
  413. />
  414. </tr>
  415. </thead>
  416. <tbody>
  417. <tr
  418. key="1"
  419. >
  420. <td
  421. className="width-4 text-center link-td"
  422. >
  423. <a
  424. href="org/teams/edit/1"
  425. >
  426. <img
  427. className="filter-table__avatar"
  428. src="some/url/"
  429. />
  430. </a>
  431. </td>
  432. <td
  433. className="link-td"
  434. >
  435. <a
  436. href="org/teams/edit/1"
  437. >
  438. test-1
  439. </a>
  440. </td>
  441. <td
  442. className="link-td"
  443. >
  444. <a
  445. href="org/teams/edit/1"
  446. >
  447. test-1@test.com
  448. </a>
  449. </td>
  450. <td
  451. className="link-td"
  452. >
  453. <a
  454. href="org/teams/edit/1"
  455. >
  456. 1
  457. </a>
  458. </td>
  459. <td
  460. className="text-right"
  461. >
  462. <DeleteButton
  463. disabled={true}
  464. onConfirm={[Function]}
  465. />
  466. </td>
  467. </tr>
  468. </tbody>
  469. </table>
  470. </div>
  471. </PageContents>
  472. </Page>
  473. `;
  474. exports[`Render when feature toggle editorsCanAdmin is turned on and signedin user is not viewer should enable the new team button 1`] = `
  475. <Page
  476. navModel={
  477. Object {
  478. "main": Object {
  479. "text": "Configuration",
  480. },
  481. "node": Object {
  482. "text": "Team List",
  483. },
  484. }
  485. }
  486. >
  487. <PageContents
  488. isLoading={false}
  489. >
  490. <div
  491. className="page-action-bar"
  492. >
  493. <div
  494. className="gf-form gf-form--grow"
  495. >
  496. <ForwardRef
  497. inputClassName="gf-form-input"
  498. labelClassName="gf-form--has-input-icon gf-form--grow"
  499. onChange={[Function]}
  500. placeholder="Search teams"
  501. value=""
  502. />
  503. </div>
  504. <div
  505. className="page-action-bar__spacer"
  506. />
  507. <a
  508. className="btn btn-primary"
  509. href="org/teams/new"
  510. >
  511. New team
  512. </a>
  513. </div>
  514. <div
  515. className="admin-list-table"
  516. >
  517. <table
  518. className="filter-table filter-table--hover form-inline"
  519. >
  520. <thead>
  521. <tr>
  522. <th />
  523. <th>
  524. Name
  525. </th>
  526. <th>
  527. Email
  528. </th>
  529. <th>
  530. Members
  531. </th>
  532. <th
  533. style={
  534. Object {
  535. "width": "1%",
  536. }
  537. }
  538. />
  539. </tr>
  540. </thead>
  541. <tbody>
  542. <tr
  543. key="1"
  544. >
  545. <td
  546. className="width-4 text-center link-td"
  547. >
  548. <a
  549. href="org/teams/edit/1"
  550. >
  551. <img
  552. className="filter-table__avatar"
  553. src="some/url/"
  554. />
  555. </a>
  556. </td>
  557. <td
  558. className="link-td"
  559. >
  560. <a
  561. href="org/teams/edit/1"
  562. >
  563. test-1
  564. </a>
  565. </td>
  566. <td
  567. className="link-td"
  568. >
  569. <a
  570. href="org/teams/edit/1"
  571. >
  572. test-1@test.com
  573. </a>
  574. </td>
  575. <td
  576. className="link-td"
  577. >
  578. <a
  579. href="org/teams/edit/1"
  580. >
  581. 1
  582. </a>
  583. </td>
  584. <td
  585. className="text-right"
  586. >
  587. <DeleteButton
  588. disabled={true}
  589. onConfirm={[Function]}
  590. />
  591. </td>
  592. </tr>
  593. </tbody>
  594. </table>
  595. </div>
  596. </PageContents>
  597. </Page>
  598. `;