widgets.test.js.snap 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. // Jest Snapshot v1, https://goo.gl/fbAQLP
  2. exports[`telepath: wagtail.widgets.CheckboxInput it renders correctly 1`] = `"<input type=\\"checkbox\\" name=\\"sugar\\" id=\\"id-sugar\\" checked=\\"checked\\">"`;
  3. exports[`telepath: wagtail.widgets.PageChooser it renders correctly 1`] = `
  4. "<div id=\\"the-id-chooser\\" class=\\"chooser page-chooser\\" data-chooser-url=\\"/admin/choose-page/\\">
  5. <div class=\\"chosen\\">
  6. <div class=\\"chooser__preview\\" role=\\"presentation\\"></div>
  7. <div class=\\"chooser__title\\" data-chooser-title=\\"\\" id=\\"the-id-title\\">Welcome to the Wagtail Bakery!</div>
  8. <ul class=\\"chooser__actions\\">
  9. <li>
  10. <button type=\\"button\\" class=\\"button action-choose button-small button-secondary\\" aria-describedby=\\"the-id-title\\">
  11. Change
  12. </button>
  13. </li>
  14. <li>
  15. <a href=\\"/admin/pages/60/edit/\\" class=\\"edit-link button button-small button-secondary\\" target=\\"_blank\\" rel=\\"noreferrer\\" aria-describedby=\\"the-id-title\\">
  16. Edit
  17. </a>
  18. </li>
  19. </ul>
  20. </div>
  21. <div class=\\"unchosen\\">
  22. <button type=\\"button\\" class=\\"button action-choose button-small button-secondary chooser__choose-button\\">
  23. <svg class=\\"icon icon-doc-empty-inverse\\" aria-hidden=\\"true\\"><use href=\\"#icon-doc-empty-inverse\\"></use></svg>Choose a page
  24. </button>
  25. </div>
  26. </div>
  27. <input type=\\"hidden\\" name=\\"the-name\\" id=\\"the-id\\" value=\\"60\\">"
  28. `;
  29. exports[`telepath: wagtail.widgets.PageChooser setState() changes the current page 1`] = `
  30. "<div id=\\"the-id-chooser\\" class=\\"chooser page-chooser\\" data-chooser-url=\\"/admin/choose-page/\\">
  31. <div class=\\"chosen\\">
  32. <div class=\\"chooser__preview\\" role=\\"presentation\\"></div>
  33. <div class=\\"chooser__title\\" data-chooser-title=\\"\\" id=\\"the-id-title\\">Anadama</div>
  34. <ul class=\\"chooser__actions\\">
  35. <li>
  36. <button type=\\"button\\" class=\\"button action-choose button-small button-secondary\\" aria-describedby=\\"the-id-title\\">
  37. Change
  38. </button>
  39. </li>
  40. <li>
  41. <a href=\\"/admin/pages/34/edit/\\" class=\\"edit-link button button-small button-secondary\\" target=\\"_blank\\" rel=\\"noreferrer\\" aria-describedby=\\"the-id-title\\">
  42. Edit
  43. </a>
  44. </li>
  45. </ul>
  46. </div>
  47. <div class=\\"unchosen\\">
  48. <button type=\\"button\\" class=\\"button action-choose button-small button-secondary chooser__choose-button\\">
  49. <svg class=\\"icon icon-doc-empty-inverse\\" aria-hidden=\\"true\\"><use href=\\"#icon-doc-empty-inverse\\"></use></svg>Choose a page
  50. </button>
  51. </div>
  52. </div>
  53. <input type=\\"hidden\\" name=\\"the-name\\" id=\\"the-id\\" value=\\"34\\">"
  54. `;
  55. exports[`telepath: wagtail.widgets.PageChooser setState() to null clears the fields 1`] = `
  56. "<div id=\\"the-id-chooser\\" class=\\"chooser page-chooser blank\\" data-chooser-url=\\"/admin/choose-page/\\">
  57. <div class=\\"chosen\\">
  58. <div class=\\"chooser__preview\\" role=\\"presentation\\"></div>
  59. <div class=\\"chooser__title\\" data-chooser-title=\\"\\" id=\\"the-id-title\\">Welcome to the Wagtail Bakery!</div>
  60. <ul class=\\"chooser__actions\\">
  61. <li>
  62. <button type=\\"button\\" class=\\"button action-choose button-small button-secondary\\" aria-describedby=\\"the-id-title\\">
  63. Change
  64. </button>
  65. </li>
  66. <li>
  67. <a href=\\"/admin/pages/60/edit/\\" class=\\"edit-link button button-small button-secondary\\" target=\\"_blank\\" rel=\\"noreferrer\\" aria-describedby=\\"the-id-title\\">
  68. Edit
  69. </a>
  70. </li>
  71. </ul>
  72. </div>
  73. <div class=\\"unchosen\\">
  74. <button type=\\"button\\" class=\\"button action-choose button-small button-secondary chooser__choose-button\\">
  75. <svg class=\\"icon icon-doc-empty-inverse\\" aria-hidden=\\"true\\"><use href=\\"#icon-doc-empty-inverse\\"></use></svg>Choose a page
  76. </button>
  77. </div>
  78. </div>
  79. <input type=\\"hidden\\" name=\\"the-name\\" id=\\"the-id\\" value=\\"\\">"
  80. `;
  81. exports[`telepath: wagtail.widgets.RadioSelect it renders correctly 1`] = `
  82. "<ul id=\\"the-id\\">
  83. <li>
  84. <label for=\\"the-id_0\\">
  85. <input type=\\"radio\\" name=\\"the-name\\" value=\\"tea\\" id=\\"the-id_0\\"> Tea</label>
  86. </li>
  87. <li>
  88. <label for=\\"the-id_1\\">
  89. <input type=\\"radio\\" name=\\"the-name\\" value=\\"coffee\\" id=\\"the-id_1\\"> Coffee</label>
  90. </li>
  91. </ul>"
  92. `;
  93. exports[`telepath: wagtail.widgets.Select it renders correctly 1`] = `
  94. "<select name=\\"the-name\\" id=\\"the-id\\">
  95. <option value=\\"1\\">Option 1</option>
  96. <option value=\\"2\\">Option 2</option>
  97. </select>"
  98. `;