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.

FeaturedProjects-test.tsx.snap 6.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305
  1. // Jest Snapshot v1, https://goo.gl/fbAQLP
  2. exports[`should render ProjectCard correctly 1`] = `
  3. <div
  4. className="sc-project-card-container"
  5. style={
  6. Object {
  7. "order": 1,
  8. }
  9. }
  10. >
  11. <Link
  12. className="sc-project-card"
  13. onlyActiveOnIndex={false}
  14. style={Object {}}
  15. to={
  16. Object {
  17. "pathname": "/dashboard",
  18. "query": Object {
  19. "branch": undefined,
  20. "id": "sonarsource-jfrog.simple-js-php-project",
  21. },
  22. }
  23. }
  24. >
  25. <div
  26. className="sc-project-card-header"
  27. >
  28. <OrganizationAvatar
  29. className="no-border spacer-bottom"
  30. organization={
  31. Object {
  32. "avatar": undefined,
  33. "name": "SonarSource & JFrog",
  34. }
  35. }
  36. />
  37. <p
  38. className="sc-project-card-limited"
  39. title="SonarSource & JFrog"
  40. >
  41. SonarSource & JFrog
  42. </p>
  43. <h5
  44. className="sc-project-card-limited big-spacer-bottom"
  45. title="Simple JS & PHP project"
  46. >
  47. Simple JS & PHP project
  48. </h5>
  49. <Level
  50. level="OK"
  51. />
  52. </div>
  53. <ul
  54. className="sc-project-card-measures"
  55. >
  56. <ProjectIssues
  57. metric={0}
  58. metricKey="bugs"
  59. ratingMetric={1}
  60. viewable={false}
  61. />
  62. <ProjectIssues
  63. metric={0}
  64. metricKey="vulnerabilities"
  65. ratingMetric={1}
  66. viewable={false}
  67. />
  68. <ProjectIssues
  69. metric={7}
  70. metricKey="code_smells"
  71. ratingMetric={1}
  72. viewable={false}
  73. />
  74. <li>
  75. <span>
  76. overview.metric.coverage
  77. </span>
  78. <div>
  79. <CoverageRating
  80. value={9.7}
  81. />
  82. </div>
  83. </li>
  84. <li>
  85. <span>
  86. overview.metric.duplications
  87. </span>
  88. <div>
  89. <DuplicationsRating
  90. value={56.2}
  91. />
  92. </div>
  93. </li>
  94. </ul>
  95. <div
  96. className="sc-mention text-left big-spacer-top"
  97. >
  98. 324
  99. lines of code /
  100. <Connect(ProjectCardLanguages)
  101. className="display-inline-block"
  102. distribution="js;php"
  103. />
  104. </div>
  105. </Link>
  106. </div>
  107. `;
  108. exports[`should render ProjectIssues correctly 1`] = `
  109. <li>
  110. <span>
  111. overview.metric.foo
  112. </span>
  113. <div>
  114. <Rating
  115. value={20}
  116. />
  117. </div>
  118. </li>
  119. `;
  120. exports[`should render correctly 1`] = `
  121. <div
  122. className="sc-featured-projects sc-big-spacer-bottom"
  123. >
  124. <button
  125. className="js-prev sc-project-button"
  126. onClick={[Function]}
  127. type="button"
  128. >
  129. <img
  130. alt=""
  131. src="/images/sonarcloud/chevron-left.svg"
  132. />
  133. </button>
  134. <div
  135. className="sc-featured-projects-container"
  136. >
  137. <div
  138. className="sc-featured-projects-inner ready"
  139. >
  140. <ProjectCard
  141. key="example-js-4"
  142. order={0}
  143. project={
  144. Object {
  145. "avatarUrl": null,
  146. "bugs": 13,
  147. "codeSmells": 5,
  148. "coverage": 0,
  149. "duplications": 0,
  150. "gateStatus": "OK",
  151. "key": "example-js-4",
  152. "languages": Array [
  153. "go",
  154. "js",
  155. "php",
  156. "py",
  157. ],
  158. "maintainabilityRating": 1,
  159. "name": "example-js",
  160. "ncloc": 80,
  161. "organizationKey": "autoscan",
  162. "organizationName": "AutoScan",
  163. "reliabilityRating": 1,
  164. "securityRating": 1,
  165. "vulnerabilities": 0,
  166. }
  167. }
  168. viewable={false}
  169. />
  170. <ProjectCard
  171. key="sonarsource-jfrog.simple-js-php-project"
  172. order={1}
  173. project={
  174. Object {
  175. "avatarUrl": null,
  176. "bugs": 0,
  177. "codeSmells": 7,
  178. "coverage": 9.7,
  179. "duplications": 56.2,
  180. "gateStatus": "OK",
  181. "key": "sonarsource-jfrog.simple-js-php-project",
  182. "languages": Array [
  183. "js",
  184. "php",
  185. ],
  186. "maintainabilityRating": 1,
  187. "name": "Simple JS & PHP project",
  188. "ncloc": 324,
  189. "organizationKey": "sonarsource-jfrog",
  190. "organizationName": "SonarSource & JFrog",
  191. "reliabilityRating": 1,
  192. "securityRating": 1,
  193. "vulnerabilities": 0,
  194. }
  195. }
  196. viewable={false}
  197. />
  198. <ProjectCard
  199. key="example-js"
  200. order={2}
  201. project={
  202. Object {
  203. "avatarUrl": null,
  204. "bugs": 13,
  205. "codeSmells": 5,
  206. "coverage": 0,
  207. "duplications": 0,
  208. "gateStatus": "OK",
  209. "key": "example-js",
  210. "languages": Array [
  211. "go",
  212. "js",
  213. "php",
  214. "py",
  215. ],
  216. "maintainabilityRating": 1,
  217. "name": "example-js",
  218. "ncloc": 80,
  219. "organizationKey": "autoscan",
  220. "organizationName": "AutoScan",
  221. "reliabilityRating": 1,
  222. "securityRating": 1,
  223. "vulnerabilities": 0,
  224. }
  225. }
  226. viewable={false}
  227. />
  228. <ProjectCard
  229. key="example-js-2"
  230. order={3}
  231. project={
  232. Object {
  233. "avatarUrl": null,
  234. "bugs": 13,
  235. "codeSmells": 5,
  236. "coverage": 0,
  237. "duplications": 0,
  238. "gateStatus": "OK",
  239. "key": "example-js-2",
  240. "languages": Array [
  241. "go",
  242. "js",
  243. "php",
  244. "py",
  245. ],
  246. "maintainabilityRating": 1,
  247. "name": "example-js",
  248. "ncloc": 80,
  249. "organizationKey": "autoscan",
  250. "organizationName": "AutoScan",
  251. "reliabilityRating": 1,
  252. "securityRating": 1,
  253. "vulnerabilities": 0,
  254. }
  255. }
  256. viewable={false}
  257. />
  258. <ProjectCard
  259. key="example-js-3"
  260. order={4}
  261. project={
  262. Object {
  263. "avatarUrl": null,
  264. "bugs": 13,
  265. "codeSmells": 5,
  266. "coverage": 0,
  267. "duplications": 0,
  268. "gateStatus": "OK",
  269. "key": "example-js-3",
  270. "languages": Array [
  271. "go",
  272. "js",
  273. "php",
  274. "py",
  275. ],
  276. "maintainabilityRating": 1,
  277. "name": "example-js",
  278. "ncloc": 80,
  279. "organizationKey": "autoscan",
  280. "organizationName": "AutoScan",
  281. "reliabilityRating": 1,
  282. "securityRating": 1,
  283. "vulnerabilities": 0,
  284. }
  285. }
  286. viewable={false}
  287. />
  288. </div>
  289. </div>
  290. <button
  291. className="js-next sc-project-button"
  292. onClick={[Function]}
  293. type="button"
  294. >
  295. <img
  296. alt=""
  297. src="/images/sonarcloud/chevron-right.svg"
  298. />
  299. </button>
  300. </div>
  301. `;