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.

NotificationsSidebar-test.tsx.snap 5.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  1. // Jest Snapshot v1, https://goo.gl/fbAQLP
  2. exports[`#Feature should render correctly 1`] = `
  3. <div
  4. className="feature"
  5. >
  6. <ul
  7. className="categories spacer-bottom"
  8. >
  9. <li
  10. key="BitBucket"
  11. style={
  12. Object {
  13. "backgroundColor": "#0000ff",
  14. }
  15. }
  16. >
  17. BitBucket
  18. </li>
  19. </ul>
  20. <span>
  21. BitBucket branch decoration
  22. </span>
  23. <a
  24. className="learn-more"
  25. href="http://example.com"
  26. rel="noopener noreferrer nofollow"
  27. target="_blank"
  28. >
  29. learn_more
  30. </a>
  31. </div>
  32. `;
  33. exports[`#Feature should render correctly 2`] = `
  34. <div
  35. className="feature"
  36. >
  37. <ul
  38. className="categories spacer-bottom"
  39. >
  40. <li
  41. key="Java"
  42. style={
  43. Object {
  44. "backgroundColor": "#ff0000",
  45. }
  46. }
  47. >
  48. Java
  49. </li>
  50. <li
  51. key="Rules"
  52. style={
  53. Object {
  54. "backgroundColor": "#00ff00",
  55. }
  56. }
  57. >
  58. Rules
  59. </li>
  60. </ul>
  61. <span>
  62. 10 new Java rules
  63. </span>
  64. </div>
  65. `;
  66. exports[`#Notification should render correctly 1`] = `
  67. <div
  68. className="notifications-sidebar-slice"
  69. >
  70. <h4>
  71. <DateFormatter
  72. date="2018-04-05"
  73. long={false}
  74. />
  75. </h4>
  76. <Feature
  77. feature={
  78. Object {
  79. "categories": Array [
  80. Object {
  81. "color": "#0000ff",
  82. "name": "BitBucket",
  83. },
  84. ],
  85. "description": "BitBucket branch decoration",
  86. "readMore": "http://example.com",
  87. }
  88. }
  89. key="0"
  90. />
  91. </div>
  92. `;
  93. exports[`#Notification should render correctly 2`] = `
  94. <div
  95. className="notifications-sidebar-slice unread"
  96. >
  97. <h4>
  98. <DateFormatter
  99. date="2018-04-05"
  100. long={false}
  101. />
  102. </h4>
  103. <Feature
  104. feature={
  105. Object {
  106. "categories": Array [
  107. Object {
  108. "color": "#0000ff",
  109. "name": "BitBucket",
  110. },
  111. ],
  112. "description": "BitBucket branch decoration",
  113. "readMore": "http://example.com",
  114. }
  115. }
  116. key="0"
  117. />
  118. </div>
  119. `;
  120. exports[`#NotificationSidebar should render correctly if there are new features 1`] = `
  121. <Modal
  122. contentLabel="embed_docs.whats_new"
  123. onRequestClose={[MockFunction]}
  124. >
  125. <div
  126. className="notifications-sidebar"
  127. >
  128. <div
  129. className="notifications-sidebar-top"
  130. >
  131. <h3>
  132. embed_docs.whats_new
  133. </h3>
  134. <ClearButton
  135. className="button-tiny"
  136. iconProps={
  137. Object {
  138. "size": 12,
  139. "thin": true,
  140. }
  141. }
  142. onClick={[MockFunction]}
  143. />
  144. </div>
  145. <div
  146. className="notifications-sidebar-content"
  147. >
  148. <div
  149. className="text-center"
  150. >
  151. <DeferredSpinner
  152. className="big-spacer-top"
  153. timeout={200}
  154. />
  155. </div>
  156. </div>
  157. </div>
  158. </Modal>
  159. `;
  160. exports[`#NotificationSidebar should render correctly if there are new features 2`] = `
  161. <Modal
  162. contentLabel="embed_docs.whats_new"
  163. onRequestClose={[MockFunction]}
  164. >
  165. <div
  166. className="notifications-sidebar"
  167. >
  168. <div
  169. className="notifications-sidebar-top"
  170. >
  171. <h3>
  172. embed_docs.whats_new
  173. </h3>
  174. <ClearButton
  175. className="button-tiny"
  176. iconProps={
  177. Object {
  178. "size": 12,
  179. "thin": true,
  180. }
  181. }
  182. onClick={[MockFunction]}
  183. />
  184. </div>
  185. <div
  186. className="notifications-sidebar-content"
  187. >
  188. <Notification
  189. key="2018-04-06"
  190. notification={
  191. Object {
  192. "features": Array [
  193. Object {
  194. "categories": Array [
  195. Object {
  196. "color": "#ff0000",
  197. "name": "Java",
  198. },
  199. Object {
  200. "color": "#00ff00",
  201. "name": "Rules",
  202. },
  203. ],
  204. "description": "10 new Java rules",
  205. },
  206. Object {
  207. "categories": Array [
  208. Object {
  209. "color": "#0000ff",
  210. "name": "BitBucket",
  211. },
  212. ],
  213. "description": "BitBucket branch decoration",
  214. "readMore": "http://example.com",
  215. },
  216. ],
  217. "notification": "10 Java rules, Github checks, Security Hotspots, BitBucket branch decoration",
  218. "publicationDate": "2018-04-06",
  219. }
  220. }
  221. unread={true}
  222. />
  223. <Notification
  224. key="2018-04-05"
  225. notification={
  226. Object {
  227. "features": Array [
  228. Object {
  229. "categories": Array [
  230. Object {
  231. "color": "#0000ff",
  232. "name": "BitBucket",
  233. },
  234. ],
  235. "description": "BitBucket branch decoration",
  236. "readMore": "http://example.com",
  237. },
  238. ],
  239. "notification": "Some other notification",
  240. "publicationDate": "2018-04-05",
  241. }
  242. }
  243. unread={true}
  244. />
  245. </div>
  246. <div
  247. className="notifications-sidebar-footer"
  248. >
  249. <div
  250. className="spacer-top note text-center"
  251. >
  252. <a
  253. className="spacer-left"
  254. href="#"
  255. onClick={[MockFunction]}
  256. >
  257. show_more
  258. </a>
  259. </div>
  260. </div>
  261. </div>
  262. </Modal>
  263. `;