TeamMembers.test.tsx.snap 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  1. // Jest Snapshot v1, https://goo.gl/fbAQLP
  2. exports[`Render should render component 1`] = `
  3. <div>
  4. <div
  5. className="page-action-bar"
  6. >
  7. <div
  8. className="gf-form gf-form--grow"
  9. >
  10. <FilterInput
  11. onChange={[Function]}
  12. placeholder="Search members"
  13. value=""
  14. />
  15. </div>
  16. <Button
  17. className="pull-right"
  18. disabled={false}
  19. onClick={[Function]}
  20. >
  21. Add member
  22. </Button>
  23. </div>
  24. <SlideDown
  25. in={false}
  26. >
  27. <div
  28. className="cta-form"
  29. >
  30. <CloseButton
  31. aria-label="Close 'Add team member' dialogue"
  32. onClick={[Function]}
  33. />
  34. <Label
  35. htmlFor="user-picker"
  36. >
  37. Add team member
  38. </Label>
  39. <div
  40. className="gf-form-inline"
  41. >
  42. <UserPicker
  43. className="min-width-30"
  44. inputId="user-picker"
  45. onSelected={[Function]}
  46. />
  47. </div>
  48. </div>
  49. </SlideDown>
  50. <div
  51. className="admin-list-table"
  52. >
  53. <table
  54. className="filter-table filter-table--hover form-inline"
  55. >
  56. <thead>
  57. <tr>
  58. <th />
  59. <th>
  60. Login
  61. </th>
  62. <th>
  63. Email
  64. </th>
  65. <th>
  66. Name
  67. </th>
  68. <WithFeatureToggle
  69. featureToggle={false}
  70. >
  71. <th>
  72. Permission
  73. </th>
  74. </WithFeatureToggle>
  75. <th
  76. style={
  77. Object {
  78. "width": "1%",
  79. }
  80. }
  81. />
  82. </tr>
  83. </thead>
  84. <tbody />
  85. </table>
  86. </div>
  87. </div>
  88. `;
  89. exports[`Render should render team members 1`] = `
  90. <div>
  91. <div
  92. className="page-action-bar"
  93. >
  94. <div
  95. className="gf-form gf-form--grow"
  96. >
  97. <FilterInput
  98. onChange={[Function]}
  99. placeholder="Search members"
  100. value=""
  101. />
  102. </div>
  103. <Button
  104. className="pull-right"
  105. disabled={false}
  106. onClick={[Function]}
  107. >
  108. Add member
  109. </Button>
  110. </div>
  111. <SlideDown
  112. in={false}
  113. >
  114. <div
  115. className="cta-form"
  116. >
  117. <CloseButton
  118. aria-label="Close 'Add team member' dialogue"
  119. onClick={[Function]}
  120. />
  121. <Label
  122. htmlFor="user-picker"
  123. >
  124. Add team member
  125. </Label>
  126. <div
  127. className="gf-form-inline"
  128. >
  129. <UserPicker
  130. className="min-width-30"
  131. inputId="user-picker"
  132. onSelected={[Function]}
  133. />
  134. </div>
  135. </div>
  136. </SlideDown>
  137. <div
  138. className="admin-list-table"
  139. >
  140. <table
  141. className="filter-table filter-table--hover form-inline"
  142. >
  143. <thead>
  144. <tr>
  145. <th />
  146. <th>
  147. Login
  148. </th>
  149. <th>
  150. Email
  151. </th>
  152. <th>
  153. Name
  154. </th>
  155. <WithFeatureToggle
  156. featureToggle={false}
  157. >
  158. <th>
  159. Permission
  160. </th>
  161. </WithFeatureToggle>
  162. <th
  163. style={
  164. Object {
  165. "width": "1%",
  166. }
  167. }
  168. />
  169. </tr>
  170. </thead>
  171. <tbody>
  172. <Connect(TeamMemberRow)
  173. editorsCanAdmin={false}
  174. key="1"
  175. member={
  176. Object {
  177. "avatarUrl": "some/url/",
  178. "email": "test@test.com",
  179. "labels": Array [
  180. "label 1",
  181. "label 2",
  182. ],
  183. "login": "testUser-1",
  184. "name": "testName",
  185. "permission": 0,
  186. "teamId": 1,
  187. "userId": 1,
  188. }
  189. }
  190. signedInUserIsTeamAdmin={true}
  191. syncEnabled={false}
  192. />
  193. <Connect(TeamMemberRow)
  194. editorsCanAdmin={false}
  195. key="2"
  196. member={
  197. Object {
  198. "avatarUrl": "some/url/",
  199. "email": "test@test.com",
  200. "labels": Array [
  201. "label 1",
  202. "label 2",
  203. ],
  204. "login": "testUser-2",
  205. "name": "testName",
  206. "permission": 0,
  207. "teamId": 1,
  208. "userId": 2,
  209. }
  210. }
  211. signedInUserIsTeamAdmin={true}
  212. syncEnabled={false}
  213. />
  214. <Connect(TeamMemberRow)
  215. editorsCanAdmin={false}
  216. key="3"
  217. member={
  218. Object {
  219. "avatarUrl": "some/url/",
  220. "email": "test@test.com",
  221. "labels": Array [
  222. "label 1",
  223. "label 2",
  224. ],
  225. "login": "testUser-3",
  226. "name": "testName",
  227. "permission": 0,
  228. "teamId": 1,
  229. "userId": 3,
  230. }
  231. }
  232. signedInUserIsTeamAdmin={true}
  233. syncEnabled={false}
  234. />
  235. <Connect(TeamMemberRow)
  236. editorsCanAdmin={false}
  237. key="4"
  238. member={
  239. Object {
  240. "avatarUrl": "some/url/",
  241. "email": "test@test.com",
  242. "labels": Array [
  243. "label 1",
  244. "label 2",
  245. ],
  246. "login": "testUser-4",
  247. "name": "testName",
  248. "permission": 0,
  249. "teamId": 1,
  250. "userId": 4,
  251. }
  252. }
  253. signedInUserIsTeamAdmin={true}
  254. syncEnabled={false}
  255. />
  256. <Connect(TeamMemberRow)
  257. editorsCanAdmin={false}
  258. key="5"
  259. member={
  260. Object {
  261. "avatarUrl": "some/url/",
  262. "email": "test@test.com",
  263. "labels": Array [
  264. "label 1",
  265. "label 2",
  266. ],
  267. "login": "testUser-5",
  268. "name": "testName",
  269. "permission": 4,
  270. "teamId": 1,
  271. "userId": 5,
  272. }
  273. }
  274. signedInUserIsTeamAdmin={true}
  275. syncEnabled={false}
  276. />
  277. </tbody>
  278. </table>
  279. </div>
  280. </div>
  281. `;