You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

MeasureHeader-test.tsx.snap 5.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. // Jest Snapshot v1, https://goo.gl/fbAQLP
  2. exports[`should render correctly 1`] = `
  3. <div
  4. className="measure-details-header big-spacer-bottom"
  5. >
  6. <div
  7. className="measure-details-primary"
  8. >
  9. <div
  10. className="measure-details-metric"
  11. >
  12. <IssueTypeIcon
  13. className="little-spacer-right text-text-bottom"
  14. query="reliability_rating"
  15. />
  16. Reliability Rating
  17. <span
  18. className="measure-details-value spacer-left"
  19. >
  20. <strong>
  21. <Measure
  22. metricKey="reliability_rating"
  23. metricType="RATING"
  24. value="3.0"
  25. />
  26. </strong>
  27. </span>
  28. <Tooltip
  29. overlay="component_measures.show_metric_history"
  30. >
  31. <Link
  32. className="js-show-history spacer-left button button-small"
  33. onlyActiveOnIndex={false}
  34. style={Object {}}
  35. to={
  36. Object {
  37. "pathname": "/project/activity",
  38. "query": Object {
  39. "custom_metrics": "reliability_rating",
  40. "graph": "custom",
  41. "id": "foo",
  42. },
  43. }
  44. }
  45. >
  46. <HistoryIcon />
  47. </Link>
  48. </Tooltip>
  49. </div>
  50. <div
  51. className="measure-details-primary-actions"
  52. >
  53. <InjectIntl(LeakPeriodLegend)
  54. className="spacer-left"
  55. component={
  56. Object {
  57. "key": "foo",
  58. "name": "Foo",
  59. "qualifier": "TRK",
  60. }
  61. }
  62. period={
  63. Object {
  64. "date": "2017-05-16T13:50:02+0200",
  65. "index": 1,
  66. "mode": "previous_version",
  67. "parameter": "6,4",
  68. }
  69. }
  70. />
  71. </div>
  72. </div>
  73. </div>
  74. `;
  75. exports[`should render correctly for leak 1`] = `
  76. <div
  77. className="measure-details-header big-spacer-bottom"
  78. >
  79. <div
  80. className="measure-details-primary"
  81. >
  82. <div
  83. className="measure-details-metric"
  84. >
  85. <IssueTypeIcon
  86. className="little-spacer-right text-text-bottom"
  87. query="new_reliability_rating"
  88. />
  89. Reliability Rating on New Code
  90. <span
  91. className="measure-details-value spacer-left"
  92. >
  93. <strong>
  94. <Measure
  95. className="leak-box"
  96. metricKey="new_reliability_rating"
  97. metricType="RATING"
  98. value="3.0"
  99. />
  100. </strong>
  101. </span>
  102. </div>
  103. <div
  104. className="measure-details-primary-actions"
  105. >
  106. <InjectIntl(LeakPeriodLegend)
  107. className="spacer-left"
  108. component={
  109. Object {
  110. "key": "foo",
  111. "name": "Foo",
  112. "qualifier": "TRK",
  113. }
  114. }
  115. period={
  116. Object {
  117. "date": "2017-05-16T13:50:02+0200",
  118. "index": 1,
  119. "mode": "previous_version",
  120. "parameter": "6,4",
  121. }
  122. }
  123. />
  124. </div>
  125. </div>
  126. </div>
  127. `;
  128. exports[`should render with long living branch 1`] = `
  129. <Link
  130. className="js-show-history spacer-left button button-small"
  131. onlyActiveOnIndex={false}
  132. style={Object {}}
  133. to={
  134. Object {
  135. "pathname": "/project/activity",
  136. "query": Object {
  137. "branch": "branch-6.7",
  138. "custom_metrics": "reliability_rating",
  139. "graph": "custom",
  140. "id": "foo",
  141. },
  142. }
  143. }
  144. >
  145. <HistoryIcon />
  146. </Link>
  147. `;
  148. exports[`should render with short living branch 1`] = `
  149. <div
  150. className="measure-details-header big-spacer-bottom"
  151. >
  152. <div
  153. className="measure-details-primary"
  154. >
  155. <div
  156. className="measure-details-metric"
  157. >
  158. <IssueTypeIcon
  159. className="little-spacer-right text-text-bottom"
  160. query="new_reliability_rating"
  161. />
  162. Reliability Rating on New Code
  163. <span
  164. className="measure-details-value spacer-left"
  165. >
  166. <strong>
  167. <Measure
  168. className="leak-box"
  169. metricKey="new_reliability_rating"
  170. metricType="RATING"
  171. value="3.0"
  172. />
  173. </strong>
  174. </span>
  175. </div>
  176. <div
  177. className="measure-details-primary-actions"
  178. />
  179. </div>
  180. </div>
  181. `;
  182. exports[`should work with measure without value 1`] = `
  183. <div
  184. className="measure-details-header big-spacer-bottom"
  185. >
  186. <div
  187. className="measure-details-primary"
  188. >
  189. <div
  190. className="measure-details-metric"
  191. >
  192. <IssueTypeIcon
  193. className="little-spacer-right text-text-bottom"
  194. query="reliability_rating"
  195. />
  196. Reliability Rating
  197. <span
  198. className="measure-details-value spacer-left"
  199. >
  200. <strong>
  201. <Measure
  202. metricKey="reliability_rating"
  203. metricType="RATING"
  204. />
  205. </strong>
  206. </span>
  207. <Tooltip
  208. overlay="component_measures.show_metric_history"
  209. >
  210. <Link
  211. className="js-show-history spacer-left button button-small"
  212. onlyActiveOnIndex={false}
  213. style={Object {}}
  214. to={
  215. Object {
  216. "pathname": "/project/activity",
  217. "query": Object {
  218. "custom_metrics": "reliability_rating",
  219. "graph": "custom",
  220. "id": "foo",
  221. },
  222. }
  223. }
  224. >
  225. <HistoryIcon />
  226. </Link>
  227. </Tooltip>
  228. </div>
  229. <div
  230. className="measure-details-primary-actions"
  231. >
  232. <InjectIntl(LeakPeriodLegend)
  233. className="spacer-left"
  234. component={
  235. Object {
  236. "key": "foo",
  237. "name": "Foo",
  238. "qualifier": "TRK",
  239. }
  240. }
  241. period={
  242. Object {
  243. "date": "2017-05-16T13:50:02+0200",
  244. "index": 1,
  245. "mode": "previous_version",
  246. "parameter": "6,4",
  247. }
  248. }
  249. />
  250. </div>
  251. </div>
  252. </div>
  253. `;