TeamMemberRow.test.tsx.snap 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. // Jest Snapshot v1, https://goo.gl/fbAQLP
  2. exports[`Render should render team members when sync enabled 1`] = `
  3. <tr
  4. key="1"
  5. >
  6. <td
  7. className="width-4 text-center"
  8. >
  9. <img
  10. className="filter-table__avatar"
  11. src="some/url/"
  12. />
  13. </td>
  14. <td>
  15. testUser
  16. </td>
  17. <td>
  18. test@test.com
  19. </td>
  20. <Component
  21. featureToggle={false}
  22. >
  23. <td
  24. className="width-5 team-permissions"
  25. >
  26. <div
  27. className="gf-form"
  28. >
  29. <span>
  30. Member
  31. </span>
  32. </div>
  33. </td>
  34. </Component>
  35. <td>
  36. <TagBadge
  37. count={0}
  38. key="LDAP"
  39. label="LDAP"
  40. onClick={[Function]}
  41. removeIcon={false}
  42. />
  43. </td>
  44. <td
  45. className="text-right"
  46. >
  47. <DeleteButton
  48. disabled={true}
  49. onConfirm={[Function]}
  50. />
  51. </td>
  52. </tr>
  53. `;
  54. exports[`Render when feature toggle editorsCanAdmin is turned off should not render permissions 1`] = `
  55. <tr
  56. key="1"
  57. >
  58. <td
  59. className="width-4 text-center"
  60. >
  61. <img
  62. className="filter-table__avatar"
  63. src="some/url/"
  64. />
  65. </td>
  66. <td>
  67. testUser
  68. </td>
  69. <td>
  70. test@test.com
  71. </td>
  72. <Component
  73. featureToggle={false}
  74. >
  75. <td
  76. className="width-5 team-permissions"
  77. >
  78. <div
  79. className="gf-form"
  80. >
  81. <Select
  82. autoFocus={false}
  83. backspaceRemovesValue={true}
  84. className="gf-form-select-box__control--menu-right"
  85. components={
  86. Object {
  87. "Group": [Function],
  88. "IndicatorsContainer": [Function],
  89. "MenuList": [Function],
  90. "Option": [Function],
  91. "SingleValue": [Function],
  92. }
  93. }
  94. isClearable={false}
  95. isDisabled={false}
  96. isLoading={false}
  97. isMulti={false}
  98. isSearchable={false}
  99. maxMenuHeight={300}
  100. onChange={[Function]}
  101. openMenuOnFocus={false}
  102. options={
  103. Array [
  104. Object {
  105. "description": "Is team member",
  106. "label": "Member",
  107. "value": 0,
  108. },
  109. Object {
  110. "description": "Can add/remove permissions, members and delete team.",
  111. "label": "Admin",
  112. "value": 4,
  113. },
  114. ]
  115. }
  116. tabSelectsValue={true}
  117. value={
  118. Object {
  119. "description": "Is team member",
  120. "label": "Member",
  121. "value": 0,
  122. }
  123. }
  124. />
  125. </div>
  126. </td>
  127. </Component>
  128. <td
  129. className="text-right"
  130. >
  131. <DeleteButton
  132. disabled={false}
  133. onConfirm={[Function]}
  134. />
  135. </td>
  136. </tr>
  137. `;
  138. exports[`Render when feature toggle editorsCanAdmin is turned on should render permissions select if user is team admin 1`] = `
  139. <tr
  140. key="1"
  141. >
  142. <td
  143. className="width-4 text-center"
  144. >
  145. <img
  146. className="filter-table__avatar"
  147. src="some/url/"
  148. />
  149. </td>
  150. <td>
  151. testUser
  152. </td>
  153. <td>
  154. test@test.com
  155. </td>
  156. <Component
  157. featureToggle={true}
  158. >
  159. <td
  160. className="width-5 team-permissions"
  161. >
  162. <div
  163. className="gf-form"
  164. >
  165. <Select
  166. autoFocus={false}
  167. backspaceRemovesValue={true}
  168. className="gf-form-select-box__control--menu-right"
  169. components={
  170. Object {
  171. "Group": [Function],
  172. "IndicatorsContainer": [Function],
  173. "MenuList": [Function],
  174. "Option": [Function],
  175. "SingleValue": [Function],
  176. }
  177. }
  178. isClearable={false}
  179. isDisabled={false}
  180. isLoading={false}
  181. isMulti={false}
  182. isSearchable={false}
  183. maxMenuHeight={300}
  184. onChange={[Function]}
  185. openMenuOnFocus={false}
  186. options={
  187. Array [
  188. Object {
  189. "description": "Is team member",
  190. "label": "Member",
  191. "value": 0,
  192. },
  193. Object {
  194. "description": "Can add/remove permissions, members and delete team.",
  195. "label": "Admin",
  196. "value": 4,
  197. },
  198. ]
  199. }
  200. tabSelectsValue={true}
  201. value={
  202. Object {
  203. "description": "Is team member",
  204. "label": "Member",
  205. "value": 0,
  206. }
  207. }
  208. />
  209. </div>
  210. </td>
  211. </Component>
  212. <td
  213. className="text-right"
  214. >
  215. <DeleteButton
  216. disabled={false}
  217. onConfirm={[Function]}
  218. />
  219. </td>
  220. </tr>
  221. `;
  222. exports[`Render when feature toggle editorsCanAdmin is turned on should render span and disable buttons if user is team member 1`] = `
  223. <tr
  224. key="1"
  225. >
  226. <td
  227. className="width-4 text-center"
  228. >
  229. <img
  230. className="filter-table__avatar"
  231. src="some/url/"
  232. />
  233. </td>
  234. <td>
  235. testUser
  236. </td>
  237. <td>
  238. test@test.com
  239. </td>
  240. <Component
  241. featureToggle={true}
  242. >
  243. <td
  244. className="width-5 team-permissions"
  245. >
  246. <div
  247. className="gf-form"
  248. >
  249. <span>
  250. Member
  251. </span>
  252. </div>
  253. </td>
  254. </Component>
  255. <td
  256. className="text-right"
  257. >
  258. <DeleteButton
  259. disabled={true}
  260. onConfirm={[Function]}
  261. />
  262. </td>
  263. </tr>
  264. `;