contextSummary.spec.jsx.snap 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  1. // Jest Snapshot v1, https://goo.gl/fbAQLP
  2. exports[`ContextSummary render() should bail out with empty contexts 1`] = `""`;
  3. exports[`ContextSummary render() should render at least three contexts 1`] = `
  4. <div
  5. className="context-summary"
  6. >
  7. <UserSummary
  8. data={
  9. Object {
  10. "email": "mail@example.org",
  11. "id": "1",
  12. }
  13. }
  14. key="user"
  15. />
  16. <GenericSummary
  17. data={Object {}}
  18. key="browser"
  19. unknownTitle="Unknown Browser"
  20. />
  21. <DeviceSummary
  22. data={
  23. Object {
  24. "arch": "x86",
  25. "family": "iOS",
  26. "model": "iPhone10,5",
  27. "type": "device",
  28. }
  29. }
  30. key="device"
  31. />
  32. </div>
  33. `;
  34. exports[`ContextSummary render() should render nothing with a single user context 1`] = `""`;
  35. exports[`ContextSummary render() should render nothing without contexts 1`] = `""`;
  36. exports[`ContextSummary render() should render up to four contexts 1`] = `
  37. <div
  38. className="context-summary"
  39. >
  40. <UserSummary
  41. data={
  42. Object {
  43. "email": "mail@example.org",
  44. "id": "1",
  45. }
  46. }
  47. key="user"
  48. />
  49. <GenericSummary
  50. data={
  51. Object {
  52. "name": "Chrome",
  53. "version": "65.0.3325",
  54. }
  55. }
  56. key="browser"
  57. unknownTitle="Unknown Browser"
  58. />
  59. <GenericSummary
  60. data={
  61. Object {
  62. "name": "Electron",
  63. "type": "runtime",
  64. "version": "1.7.13",
  65. }
  66. }
  67. key="runtime"
  68. unknownTitle="Unknown Runtime"
  69. />
  70. <OsSummary
  71. data={
  72. Object {
  73. "build": "17E199",
  74. "kernel_version": "17.5.0",
  75. "name": "Mac OS X",
  76. "type": "os",
  77. "version": "10.13.4",
  78. }
  79. }
  80. key="os"
  81. />
  82. </div>
  83. `;
  84. exports[`ContextSummary render() should skip a missing user context 1`] = `
  85. <div
  86. className="context-summary"
  87. >
  88. <GenericSummary
  89. data={
  90. Object {
  91. "name": "Electron",
  92. "type": "runtime",
  93. "version": "1.7.13",
  94. }
  95. }
  96. key="runtime"
  97. unknownTitle="Unknown Runtime"
  98. />
  99. <OsSummary
  100. data={
  101. Object {
  102. "build": "17E199",
  103. "kernel_version": "17.5.0",
  104. "name": "Mac OS X",
  105. "type": "os",
  106. "version": "10.13.4",
  107. }
  108. }
  109. key="os"
  110. />
  111. <DeviceSummary
  112. data={
  113. Object {
  114. "arch": "x86",
  115. "family": "iOS",
  116. "model": "iPhone10,5",
  117. "type": "device",
  118. }
  119. }
  120. key="device"
  121. />
  122. </div>
  123. `;
  124. exports[`ContextSummary render() should skip non-default named contexts 1`] = `
  125. <div
  126. className="context-summary"
  127. >
  128. <UserSummary
  129. data={
  130. Object {
  131. "email": "mail@example.org",
  132. "id": "1",
  133. }
  134. }
  135. key="user"
  136. />
  137. <GenericSummary
  138. data={
  139. Object {
  140. "name": "Electron",
  141. "type": "runtime",
  142. "version": "1.7.13",
  143. }
  144. }
  145. key="runtime"
  146. unknownTitle="Unknown Runtime"
  147. />
  148. <OsSummary
  149. data={
  150. Object {
  151. "build": "17E199",
  152. "kernel_version": "17.5.0",
  153. "name": "Mac OS X",
  154. "type": "os",
  155. "version": "10.13.4",
  156. }
  157. }
  158. key="os"
  159. />
  160. <DeviceSummary
  161. data={
  162. Object {
  163. "arch": "x86",
  164. "family": "iOS",
  165. "model": "iPhone10,5",
  166. "type": "device",
  167. }
  168. }
  169. key="device"
  170. />
  171. </div>
  172. `;
  173. exports[`GpuSummary render() should render name and vendor 1`] = `
  174. <div
  175. className="context-item arm"
  176. >
  177. <span
  178. className="context-item-icon"
  179. />
  180. <h3>
  181. Mali-T880
  182. </h3>
  183. <p>
  184. <strong>
  185. Vendor:
  186. </strong>
  187. ARM
  188. </p>
  189. </div>
  190. `;
  191. exports[`GpuSummary render() should render unknown when no vendor 1`] = `
  192. <div
  193. className="context-item apple-a"
  194. >
  195. <span
  196. className="context-item-icon"
  197. />
  198. <h3>
  199. Apple A8 GPU
  200. </h3>
  201. <p>
  202. <strong>
  203. Vendor:
  204. </strong>
  205. Unknown
  206. </p>
  207. </div>
  208. `;
  209. exports[`OsSummary render() should render the kernel version when no version 1`] = `
  210. <div
  211. className="context-item mac-os-x"
  212. >
  213. <span
  214. className="context-item-icon"
  215. />
  216. <h3>
  217. Mac OS X
  218. </h3>
  219. <p>
  220. <strong>
  221. Kernel:
  222. </strong>
  223. 17.5.0
  224. </p>
  225. </div>
  226. `;
  227. exports[`OsSummary render() should render the version string 1`] = `
  228. <div
  229. className="context-item mac-os-x"
  230. >
  231. <span
  232. className="context-item-icon"
  233. />
  234. <h3>
  235. Mac OS X
  236. </h3>
  237. <p>
  238. <strong>
  239. Version:
  240. </strong>
  241. 10.13.4
  242. </p>
  243. </div>
  244. `;
  245. exports[`OsSummary render() should render unknown when no version 1`] = `
  246. <div
  247. className="context-item mac-os-x"
  248. >
  249. <span
  250. className="context-item-icon"
  251. />
  252. <h3>
  253. Mac OS X
  254. </h3>
  255. <p>
  256. <strong>
  257. Version:
  258. </strong>
  259. Unknown
  260. </p>
  261. </div>
  262. `;