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.

IssueMessage-test.tsx.snap 5.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. // Jest Snapshot v1, https://goo.gl/fbAQLP
  2. exports[`should render correctly: default 1`] = `
  3. <div
  4. className="display-inline-flex-center issue-message break-word"
  5. >
  6. <span
  7. className="spacer-right"
  8. >
  9. Reduce the number of conditional operators (4) used in the expression
  10. </span>
  11. <ButtonLink
  12. aria-label="issue.why_this_issue.long"
  13. className="issue-see-rule spacer-right text-baseline"
  14. onClick={[Function]}
  15. >
  16. issue.why_this_issue
  17. </ButtonLink>
  18. </div>
  19. `;
  20. exports[`should render correctly: is deprecated rule 1`] = `
  21. <div
  22. className="display-inline-flex-center issue-message break-word"
  23. >
  24. <span
  25. className="spacer-right"
  26. >
  27. Reduce the number of conditional operators (4) used in the expression
  28. </span>
  29. <ButtonLink
  30. aria-label="issue.why_this_issue.long"
  31. className="issue-see-rule spacer-right text-baseline"
  32. onClick={[Function]}
  33. >
  34. issue.why_this_issue
  35. </ButtonLink>
  36. <DocumentationTooltip
  37. className="spacer-left"
  38. content="rules.status.DEPRECATED.help"
  39. links={
  40. Array [
  41. Object {
  42. "href": "/documentation/user-guide/rules/",
  43. "label": "see_x.rules",
  44. },
  45. ]
  46. }
  47. >
  48. <span
  49. className="spacer-right badge badge-error"
  50. >
  51. rules.status.DEPRECATED
  52. </span>
  53. </DocumentationTooltip>
  54. </div>
  55. `;
  56. exports[`should render correctly: is manual vulnerability 1`] = `
  57. <div
  58. className="display-inline-flex-center issue-message break-word"
  59. >
  60. <span
  61. className="spacer-right"
  62. >
  63. Reduce the number of conditional operators (4) used in the expression
  64. </span>
  65. <ButtonLink
  66. aria-label="issue.why_this_issue.long"
  67. className="issue-see-rule spacer-right text-baseline"
  68. onClick={[Function]}
  69. >
  70. issue.why_this_issue
  71. </ButtonLink>
  72. <Tooltip
  73. overlay="issue.manual_vulnerability.description"
  74. >
  75. <div
  76. className="badge spacer-right text-baseline"
  77. >
  78. issue.manual_vulnerability
  79. </div>
  80. </Tooltip>
  81. </div>
  82. `;
  83. exports[`should render correctly: is removed rule 1`] = `
  84. <div
  85. className="display-inline-flex-center issue-message break-word"
  86. >
  87. <span
  88. className="spacer-right"
  89. >
  90. Reduce the number of conditional operators (4) used in the expression
  91. </span>
  92. <ButtonLink
  93. aria-label="issue.why_this_issue.long"
  94. className="issue-see-rule spacer-right text-baseline"
  95. onClick={[Function]}
  96. >
  97. issue.why_this_issue
  98. </ButtonLink>
  99. <DocumentationTooltip
  100. className="spacer-left"
  101. content="rules.status.REMOVED.help"
  102. links={
  103. Array [
  104. Object {
  105. "href": "/documentation/user-guide/rules/",
  106. "label": "see_x.rules",
  107. },
  108. ]
  109. }
  110. >
  111. <span
  112. className="spacer-right badge badge-error"
  113. >
  114. rules.status.REMOVED
  115. </span>
  116. </DocumentationTooltip>
  117. </div>
  118. `;
  119. exports[`should render correctly: with engine info 1`] = `
  120. <div
  121. className="display-inline-flex-center issue-message break-word"
  122. >
  123. <span
  124. className="spacer-right"
  125. >
  126. Reduce the number of conditional operators (4) used in the expression
  127. </span>
  128. <ButtonLink
  129. aria-label="issue.why_this_issue.long"
  130. className="issue-see-rule spacer-right text-baseline"
  131. onClick={[Function]}
  132. >
  133. issue.why_this_issue
  134. </ButtonLink>
  135. <Tooltip
  136. overlay="issue.from_external_rule_engine.js"
  137. >
  138. <div
  139. className="badge spacer-right text-baseline"
  140. >
  141. js
  142. </div>
  143. </Tooltip>
  144. </div>
  145. `;
  146. exports[`should render correctly: with engine name 1`] = `
  147. <div
  148. className="display-inline-flex-center issue-message break-word"
  149. >
  150. <span
  151. className="spacer-right"
  152. >
  153. Reduce the number of conditional operators (4) used in the expression
  154. </span>
  155. <ButtonLink
  156. aria-label="issue.why_this_issue.long"
  157. className="issue-see-rule spacer-right text-baseline"
  158. onClick={[Function]}
  159. >
  160. issue.why_this_issue
  161. </ButtonLink>
  162. <Tooltip
  163. overlay="issue.from_external_rule_engine.JS"
  164. >
  165. <div
  166. className="badge spacer-right text-baseline"
  167. >
  168. JS
  169. </div>
  170. </Tooltip>
  171. </div>
  172. `;
  173. exports[`should render correctly: with quick fix 1`] = `
  174. <div
  175. className="display-inline-flex-center issue-message break-word"
  176. >
  177. <span
  178. className="spacer-right"
  179. >
  180. Reduce the number of conditional operators (4) used in the expression
  181. </span>
  182. <Tooltip
  183. mouseLeaveDelay={0.5}
  184. overlay={
  185. <FormattedMessage
  186. defaultMessage="issue.quick_fix_available_with_sonarlint"
  187. id="issue.quick_fix_available_with_sonarlint"
  188. values={
  189. Object {
  190. "link": <a
  191. href="https://www.sonarqube.org/sonarlint/?referrer=sonarqube-quick-fix"
  192. rel="noopener noreferrer"
  193. target="_blank"
  194. >
  195. SonarLint
  196. </a>,
  197. }
  198. }
  199. />
  200. }
  201. >
  202. <SonarLintIcon
  203. className="it__issues-sonarlint-quick-fix spacer-right"
  204. size={15}
  205. />
  206. </Tooltip>
  207. <ButtonLink
  208. aria-label="issue.why_this_issue.long"
  209. className="issue-see-rule spacer-right text-baseline"
  210. onClick={[Function]}
  211. >
  212. issue.why_this_issue
  213. </ButtonLink>
  214. </div>
  215. `;