TeamMemberRow.test.tsx.snap 5.9 KB

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