kiteditor 1.0.12 → 1.0.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (289) hide show
  1. data/{lib/generators/mercury/install/images/templates → app/controllers/mercury}/images_controller.rb +0 -0
  2. data/{lib/generators/mercury/install/images/templates/ar_paperclip_image.rb → app/models/mercury/image.rb} +0 -7
  3. data/app/views/layouts/mercury.html.erb +20 -10
  4. data/app/views/mercury/modals/character.html +1 -1
  5. data/app/views/mercury/modals/htmleditor.html +7 -3
  6. data/app/views/mercury/modals/link.html +51 -37
  7. data/app/views/mercury/modals/media.html +0 -102
  8. data/app/views/mercury/modals/table.html +73 -79
  9. data/app/views/mercury/panels/snippets.html +1 -6
  10. data/app/views/mercury/snippets/example/options.html.erb +27 -23
  11. data/{lib/generators/mercury/install/images/templates/ar_paperclip_image_migration.rb → db/migrate/20110526035601_create_mercury_images.rb} +0 -0
  12. data/features/loading/loading.feature +2 -5
  13. data/features/loading/user_interface.feature +7 -9
  14. data/features/regions/{full → editable}/advanced_editing.feature +0 -0
  15. data/features/regions/editable/basic_editing.feature +195 -0
  16. data/features/regions/{full → editable}/inserting_links.feature +19 -20
  17. data/features/regions/{full → editable}/inserting_media.feature +18 -36
  18. data/features/regions/{full → editable}/inserting_snippets.feature +18 -28
  19. data/features/regions/{full → editable}/inserting_special_characters.feature +2 -2
  20. data/features/regions/editable/inserting_tables.feature +109 -0
  21. data/features/regions/{full → editable}/pasting.feature +0 -0
  22. data/features/regions/{full → editable}/uploading_images.feature +0 -0
  23. data/features/regions/{markdown → markupable}/advanced_editing.feature +0 -0
  24. data/features/regions/{markdown → markupable}/basic_editing.feature +0 -0
  25. data/features/regions/{markdown → markupable}/inserting_links.feature +0 -0
  26. data/features/regions/{markdown → markupable}/inserting_media.feature +0 -0
  27. data/features/regions/{markdown → markupable}/inserting_snippets.feature +0 -0
  28. data/features/regions/{markdown → markupable}/inserting_special_characters.feature +0 -0
  29. data/features/regions/{markdown → markupable}/inserting_tables.feature +0 -0
  30. data/features/regions/{image → markupable}/uploading_images.feature +0 -0
  31. data/features/regions/{snippets → snippetable}/advanced_editing.feature +0 -0
  32. data/features/regions/{snippets → snippetable}/basic_editing.feature +0 -0
  33. data/features/regions/{snippets → snippetable}/inserting_snippets.feature +0 -0
  34. data/features/saving/saving.feature +8 -8
  35. data/features/step_definitions/mercury_steps.rb +438 -1
  36. data/features/support/env.rb +1 -11
  37. data/{lib/mercury/cucumber → features}/support/mercury_contents.rb +3 -3
  38. data/{lib/mercury/cucumber → features}/support/mercury_selectors.rb +20 -0
  39. data/features/support/selectors.rb +0 -23
  40. data/lib/generators/mercury/install/install_generator.rb +23 -12
  41. data/lib/generators/mercury/install/{images/templates → templates}/mongoid_paperclip_image.rb +0 -0
  42. data/lib/mercury/authentication.rb +0 -1
  43. data/lib/mercury-rails.rb +2 -1
  44. data/spec/javascripts/mercury/{dialog_spec.coffee → dialog_spec.js.coffee} +12 -11
  45. data/spec/javascripts/mercury/dialogs/backcolor_spec.js.coffee +3 -2
  46. data/spec/javascripts/mercury/dialogs/forecolor_spec.js.coffee +4 -3
  47. data/spec/javascripts/mercury/dialogs/formatblock_spec.js.coffee +3 -2
  48. data/spec/javascripts/mercury/dialogs/snippetpanel_spec.js.coffee +3 -2
  49. data/spec/javascripts/mercury/dialogs/style_spec.js.coffee +3 -2
  50. data/spec/javascripts/mercury/lightview_spec.js.coffee +142 -180
  51. data/spec/javascripts/mercury/mercury_spec.js.coffee +13 -19
  52. data/spec/javascripts/mercury/modal_spec.js.coffee +148 -192
  53. data/spec/javascripts/mercury/modals/htmleditor_spec.js.coffee +5 -4
  54. data/spec/javascripts/mercury/modals/insertcharacter_spec.js.coffee +3 -2
  55. data/spec/javascripts/mercury/modals/insertlink_spec.js.coffee +34 -107
  56. data/spec/javascripts/mercury/modals/insertmedia_spec.js.coffee +26 -106
  57. data/spec/javascripts/mercury/modals/insertsnippet_spec.js.coffee +3 -2
  58. data/spec/javascripts/mercury/modals/inserttable_spec.js.coffee +40 -50
  59. data/spec/javascripts/mercury/page_editor_spec.js.coffee +80 -124
  60. data/spec/javascripts/mercury/palette_spec.js.coffee +5 -4
  61. data/spec/javascripts/mercury/panel_spec.js.coffee +12 -9
  62. data/spec/javascripts/mercury/region_spec.js.coffee +17 -22
  63. data/spec/javascripts/mercury/regions/{full_spec.js.coffee → editable_spec.js.coffee} +28 -26
  64. data/spec/javascripts/mercury/regions/{markdown_spec.js.coffee → markupable_spec.js.coffee} +34 -32
  65. data/spec/javascripts/mercury/regions/{snippets_spec.js.coffee → snippetable_spec.js.coffee} +55 -54
  66. data/spec/javascripts/mercury/select_spec.js.coffee +5 -4
  67. data/spec/javascripts/mercury/snippet_spec.js.coffee +16 -92
  68. data/spec/javascripts/mercury/snippet_toolbar_spec.js.coffee +16 -31
  69. data/spec/javascripts/mercury/statusbar_spec.js.coffee +10 -9
  70. data/spec/javascripts/mercury/table_editor_spec.js.coffee +2 -1
  71. data/spec/javascripts/mercury/toolbar.button_group_spec.js.coffee +9 -7
  72. data/spec/javascripts/mercury/toolbar.button_spec.js.coffee +26 -55
  73. data/spec/javascripts/mercury/toolbar.expander_spec.js.coffee +13 -13
  74. data/spec/javascripts/mercury/toolbar_spec.js.coffee +14 -43
  75. data/spec/javascripts/mercury/tooltip_spec.js.coffee +2 -1
  76. data/spec/javascripts/mercury/uploader_spec.js.coffee +33 -47
  77. data/spec/javascripts/{support/event_simulation.js → spec_helper.js} +2 -0
  78. data/spec/javascripts/{fixtures → templates}/mercury/dialog.html +0 -0
  79. data/spec/javascripts/{fixtures → templates}/mercury/dialogs/backcolor.html +0 -0
  80. data/spec/javascripts/{fixtures → templates}/mercury/dialogs/forecolor.html +0 -0
  81. data/spec/javascripts/{fixtures → templates}/mercury/dialogs/formatblock.html +0 -0
  82. data/spec/javascripts/{fixtures → templates}/mercury/dialogs/snippetpanel.html +0 -0
  83. data/spec/javascripts/{fixtures → templates}/mercury/dialogs/style.html +0 -0
  84. data/spec/javascripts/{fixtures → templates}/mercury/lightview.html +0 -0
  85. data/spec/javascripts/{fixtures → templates}/mercury/modal.html +0 -0
  86. data/spec/javascripts/{fixtures → templates}/mercury/modals/htmleditor.html +0 -0
  87. data/spec/javascripts/{fixtures → templates}/mercury/modals/insertcharacter.html +0 -0
  88. data/spec/javascripts/templates/mercury/modals/insertlink.html +30 -0
  89. data/spec/javascripts/templates/mercury/modals/insertmedia.html +35 -0
  90. data/spec/javascripts/{fixtures → templates}/mercury/modals/insertsnippet.html +0 -0
  91. data/spec/javascripts/templates/mercury/modals/inserttable.html +27 -0
  92. data/spec/javascripts/{fixtures → templates}/mercury/page_editor.html +4 -4
  93. data/spec/javascripts/{fixtures → templates}/mercury/palette.html +0 -0
  94. data/spec/javascripts/{fixtures → templates}/mercury/panel.html +0 -0
  95. data/spec/javascripts/templates/mercury/region.html +2 -0
  96. data/spec/javascripts/templates/mercury/regions/editable.html +3 -0
  97. data/spec/javascripts/templates/mercury/regions/snippetable.html +4 -0
  98. data/spec/javascripts/{fixtures → templates}/mercury/select.html +0 -0
  99. data/spec/javascripts/{fixtures → templates}/mercury/snippet.html +0 -0
  100. data/spec/javascripts/{fixtures → templates}/mercury/snippet_toolbar.html +0 -0
  101. data/spec/javascripts/{fixtures → templates}/mercury/statusbar.html +0 -0
  102. data/spec/javascripts/{fixtures → templates}/mercury/table_editor.html +0 -0
  103. data/spec/javascripts/{fixtures → templates}/mercury/toolbar.button.html +0 -0
  104. data/spec/javascripts/{fixtures → templates}/mercury/toolbar.button_group.html +0 -0
  105. data/spec/javascripts/{fixtures → templates}/mercury/toolbar.expander.html +0 -0
  106. data/spec/javascripts/{fixtures → templates}/mercury/toolbar.html +0 -0
  107. data/spec/javascripts/{fixtures → templates}/mercury/tooltip.html +0 -0
  108. data/spec/javascripts/{fixtures → templates}/mercury/uploader.html +0 -0
  109. data/{app → vendor}/assets/images/mercury/button.png +0 -0
  110. data/{app → vendor}/assets/images/mercury/close.png +0 -0
  111. data/{app → vendor}/assets/images/mercury/loading-dark.gif +0 -0
  112. data/{app → vendor}/assets/images/mercury/loading-light.gif +0 -0
  113. data/{app → vendor}/assets/images/mercury/missing-image.png +0 -0
  114. data/{app → vendor}/assets/images/mercury/search-icon.png +0 -0
  115. data/{app → vendor}/assets/images/mercury/temp-logo.png +0 -0
  116. data/{app/assets/javascripts → vendor/assets/javascripts/mercury/dependencies}/jquery-1.7.js +0 -0
  117. data/{app → vendor}/assets/javascripts/mercury/dependencies/jquery-ui-1.8.13.custom.js +0 -0
  118. data/{app → vendor}/assets/javascripts/mercury/dependencies/jquery.additions.js +13 -103
  119. data/{app → vendor}/assets/javascripts/mercury/dependencies/jquery.htmlClean.js +0 -0
  120. data/{app → vendor}/assets/javascripts/mercury/dependencies/liquidmetal.js +0 -0
  121. data/{app → vendor}/assets/javascripts/mercury/dependencies/showdown.js +0 -0
  122. data/{app → vendor}/assets/javascripts/mercury/dialog.js.coffee +0 -0
  123. data/{app → vendor}/assets/javascripts/mercury/dialogs/backcolor.js.coffee +0 -0
  124. data/{app → vendor}/assets/javascripts/mercury/dialogs/forecolor.js.coffee +1 -1
  125. data/{app → vendor}/assets/javascripts/mercury/dialogs/formatblock.js.coffee +0 -0
  126. data/{app → vendor}/assets/javascripts/mercury/dialogs/snippetpanel.js.coffee +1 -1
  127. data/{app → vendor}/assets/javascripts/mercury/dialogs/style.js.coffee +0 -0
  128. data/{app → vendor}/assets/javascripts/mercury/finalize.js.coffee +0 -0
  129. data/{app → vendor}/assets/javascripts/mercury/history_buffer.js.coffee +0 -0
  130. data/{app → vendor}/assets/javascripts/mercury/lightview.js.coffee +17 -38
  131. data/{features/regions/markdown/uploading_images.feature → vendor/assets/javascripts/mercury/locales/da.locale.js.coffee} +0 -0
  132. data/{app → vendor}/assets/javascripts/mercury/locales/de.locale.js.coffee +10 -4
  133. data/{app → vendor}/assets/javascripts/mercury/locales/es.locale.js.coffee +9 -3
  134. data/{app → vendor}/assets/javascripts/mercury/locales/example.local.js.coffee +5 -3
  135. data/{app → vendor}/assets/javascripts/mercury/locales/fr.locale.js.coffee +9 -3
  136. data/{app → vendor}/assets/javascripts/mercury/locales/it.locale.js.coffee +9 -3
  137. data/{app → vendor}/assets/javascripts/mercury/locales/ko.local.js.coffee +10 -4
  138. data/{app → vendor}/assets/javascripts/mercury/locales/nl.locale.js.coffee +9 -3
  139. data/{app → vendor}/assets/javascripts/mercury/locales/pt.locale.js.coffee +9 -3
  140. data/{app → vendor}/assets/javascripts/mercury/locales/sv.local.js.coffee +9 -3
  141. data/{app → vendor}/assets/javascripts/mercury/locales/swedish_chef.locale.js.coffee +9 -3
  142. data/{app → vendor}/assets/javascripts/mercury/mercury.js.coffee +1 -10
  143. data/{app → vendor}/assets/javascripts/mercury/modal.js.coffee +40 -62
  144. data/{app → vendor}/assets/javascripts/mercury/modals/htmleditor.js.coffee +2 -3
  145. data/{app → vendor}/assets/javascripts/mercury/modals/insertcharacter.js.coffee +0 -1
  146. data/{app → vendor}/assets/javascripts/mercury/modals/insertsnippet.js.coffee +0 -2
  147. data/vendor/assets/javascripts/mercury/modals/inserttable.js.coffee +54 -0
  148. data/{app → vendor}/assets/javascripts/mercury/native_extensions.js.coffee +6 -0
  149. data/{app → vendor}/assets/javascripts/mercury/page_editor.js.coffee +50 -84
  150. data/{app → vendor}/assets/javascripts/mercury/palette.js.coffee +1 -1
  151. data/{app → vendor}/assets/javascripts/mercury/panel.js.coffee +2 -3
  152. data/{app → vendor}/assets/javascripts/mercury/plugins/save_as_xml/mercury/page_editor.js.coffee +2 -2
  153. data/{app → vendor}/assets/javascripts/mercury/plugins/save_as_xml/plugin.js +0 -0
  154. data/{app → vendor}/assets/javascripts/mercury/region.js.coffee +17 -18
  155. data/{app/assets/javascripts/mercury/regions/full.js.coffee → vendor/assets/javascripts/mercury/regions/editable.js.coffee} +31 -41
  156. data/{app/assets/javascripts/mercury/regions/markdown.js.coffee → vendor/assets/javascripts/mercury/regions/markupable.js.coffee} +24 -29
  157. data/{app → vendor}/assets/javascripts/mercury/regions/simple.js.coffee +54 -11
  158. data/{app/assets/javascripts/mercury/regions/snippets.js.coffee → vendor/assets/javascripts/mercury/regions/snippetable.js.coffee} +9 -10
  159. data/{app → vendor}/assets/javascripts/mercury/select.js.coffee +1 -1
  160. data/{app → vendor}/assets/javascripts/mercury/snippet_toolbar.js.coffee +6 -19
  161. data/{app → vendor}/assets/javascripts/mercury/statusbar.js.coffee +0 -0
  162. data/{app → vendor}/assets/javascripts/mercury/support/history.js +0 -0
  163. data/{app → vendor}/assets/javascripts/mercury/table_editor.js.coffee +0 -16
  164. data/{app → vendor}/assets/javascripts/mercury/toolbar.button.js.coffee +30 -45
  165. data/{app → vendor}/assets/javascripts/mercury/toolbar.button_group.js.coffee +2 -2
  166. data/{app → vendor}/assets/javascripts/mercury/toolbar.expander.js.coffee +4 -4
  167. data/{app → vendor}/assets/javascripts/mercury/toolbar.js.coffee +6 -10
  168. data/{app → vendor}/assets/javascripts/mercury/tooltip.js.coffee +0 -0
  169. data/{app → vendor}/assets/javascripts/mercury/uploader.js.coffee +19 -37
  170. data/{app → vendor}/assets/javascripts/mercury.js +87 -60
  171. data/vendor/assets/javascripts/mercury_loader.js +193 -0
  172. data/vendor/assets/javascripts/mercury_overrides.js +6 -0
  173. data/{app → vendor}/assets/stylesheets/mercury/all_images.css.erb +2 -6
  174. data/{app → vendor}/assets/stylesheets/mercury/dialog.css +8 -21
  175. data/{app → vendor}/assets/stylesheets/mercury/lightview.css +56 -6
  176. data/vendor/assets/stylesheets/mercury/mercury.css +151 -0
  177. data/{app → vendor}/assets/stylesheets/mercury/modal.css +32 -15
  178. data/{app → vendor}/assets/stylesheets/mercury/statusbar.css +0 -0
  179. data/{app → vendor}/assets/stylesheets/mercury/toolbar.css +1 -4
  180. data/{app → vendor}/assets/stylesheets/mercury/tooltip.css +0 -0
  181. data/{app → vendor}/assets/stylesheets/mercury/uploader.css +4 -4
  182. data/{app → vendor}/assets/stylesheets/mercury.css +5 -1
  183. data/vendor/assets/stylesheets/mercury_overrides.css +17 -0
  184. metadata +197 -367
  185. data/POST_INSTALL +0 -21
  186. data/app/assets/images/mercury/default-snippet.png +0 -0
  187. data/app/assets/images/mercury/toolbar/editable/buttons.png +0 -0
  188. data/app/assets/images/mercury/toolbar/primary/_expander.png +0 -0
  189. data/app/assets/images/mercury/toolbar/primary/_pressed.png +0 -0
  190. data/app/assets/images/mercury/toolbar/primary/action.png +0 -0
  191. data/app/assets/images/mercury/toolbar/primary/historypanel.png +0 -0
  192. data/app/assets/images/mercury/toolbar/primary/insertcharacter.png +0 -0
  193. data/app/assets/images/mercury/toolbar/primary/insertlink.png +0 -0
  194. data/app/assets/images/mercury/toolbar/primary/insertmedia.png +0 -0
  195. data/app/assets/images/mercury/toolbar/primary/inserttable.png +0 -0
  196. data/app/assets/images/mercury/toolbar/primary/inspectorpanel.png +0 -0
  197. data/app/assets/images/mercury/toolbar/primary/notespanel.png +0 -0
  198. data/app/assets/images/mercury/toolbar/primary/preview.png +0 -0
  199. data/app/assets/images/mercury/toolbar/primary/redo.png +0 -0
  200. data/app/assets/images/mercury/toolbar/primary/save.png +0 -0
  201. data/app/assets/images/mercury/toolbar/primary/snippetpanel.png +0 -0
  202. data/app/assets/images/mercury/toolbar/primary/tools.png +0 -0
  203. data/app/assets/images/mercury/toolbar/primary/undo.png +0 -0
  204. data/app/assets/images/mercury/toolbar/primary/user.png +0 -0
  205. data/app/assets/images/mercury/toolbar/snippets/buttons.png +0 -0
  206. data/app/assets/javascripts/mercury/locales/ar.locale.js.coffee +0 -201
  207. data/app/assets/javascripts/mercury/locales/da.locale.js.coffee +0 -208
  208. data/app/assets/javascripts/mercury/locales/hu.locale.js.coffee +0 -209
  209. data/app/assets/javascripts/mercury/locales/pl.locale.js.coffee +0 -213
  210. data/app/assets/javascripts/mercury/locales/ru.locale.js.coffee +0 -200
  211. data/app/assets/javascripts/mercury/locales/uk.locale.js.coffee +0 -200
  212. data/app/assets/javascripts/mercury/locales/zh.local.js.coffee +0 -203
  213. data/app/assets/javascripts/mercury/mercury-compiled.js +0 -10720
  214. data/app/assets/javascripts/mercury/modals/insertlink.js.coffee +0 -152
  215. data/app/assets/javascripts/mercury/modals/insertmedia.js.coffee +0 -132
  216. data/app/assets/javascripts/mercury/modals/inserttable.js.coffee +0 -68
  217. data/app/assets/javascripts/mercury/regions/image.js.coffee +0 -93
  218. data/app/assets/javascripts/mercury/snippet.js.coffee +0 -136
  219. data/app/assets/stylesheets/_mercury-bootstrap-overrides.scss +0 -61
  220. data/app/assets/stylesheets/_mercury-sass.scss +0 -33
  221. data/app/assets/stylesheets/mercury/bootstrap-ish.css +0 -1367
  222. data/app/assets/stylesheets/mercury/bootstrap-overrides.css +0 -61
  223. data/app/assets/stylesheets/mercury/mercury.css +0 -43
  224. data/app/helpers/mercury_helper.rb +0 -7
  225. data/app/views/layouts/mercury.html.haml +0 -19
  226. data/app/views/layouts/mercury.html.slim +0 -19
  227. data/app/views/mercury/snippets/no_options/preview.html.erb +0 -1
  228. data/config/routes.rb +0 -9
  229. data/features/generators/authentication.feature +0 -10
  230. data/features/generators/images.feature +0 -41
  231. data/features/generators/install.feature +0 -21
  232. data/features/regions/full/basic_editing.feature +0 -198
  233. data/features/regions/full/inserting_tables.feature +0 -109
  234. data/features/regions/simple/basic_editing.feature +0 -5
  235. data/features/step_definitions/custom_web_steps.rb +0 -22
  236. data/features/step_definitions/generator_steps.rb +0 -23
  237. data/features/support/aruba.rb +0 -28
  238. data/lib/generators/mercury/install/authentication/authentication_generator.rb +0 -17
  239. data/lib/generators/mercury/install/images/images_generator.rb +0 -47
  240. data/lib/mercury/cucumber/step_definitions/mercury_steps.rb +0 -408
  241. data/lib/mercury/cucumber/step_definitions.rb +0 -13
  242. data/lib/mercury/engine.rb +0 -19
  243. data/lib/mercury/rails.rb +0 -5
  244. data/lib/mercury/version.rb +0 -3
  245. data/spec/dummy/Rakefile +0 -7
  246. data/spec/dummy/app/assets/javascripts/application.js +0 -0
  247. data/spec/dummy/app/assets/javascripts/prototype.js +0 -6082
  248. data/spec/dummy/app/assets/stylesheets/application.css.scss +0 -110
  249. data/spec/dummy/app/controllers/application_controller.rb +0 -3
  250. data/spec/dummy/app/views/layouts/application.html.erb +0 -14
  251. data/spec/dummy/app/views/layouts/mercury.html.erb +0 -28
  252. data/spec/dummy/config/application.rb +0 -58
  253. data/spec/dummy/config/boot.rb +0 -10
  254. data/spec/dummy/config/database.yml +0 -10
  255. data/spec/dummy/config/environment.rb +0 -5
  256. data/spec/dummy/config/environments/development.rb +0 -37
  257. data/spec/dummy/config/environments/production.rb +0 -67
  258. data/spec/dummy/config/environments/test.rb +0 -37
  259. data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
  260. data/spec/dummy/config/initializers/inflections.rb +0 -15
  261. data/spec/dummy/config/initializers/mime_types.rb +0 -5
  262. data/spec/dummy/config/initializers/secret_token.rb +0 -7
  263. data/spec/dummy/config/initializers/session_store.rb +0 -8
  264. data/spec/dummy/config/initializers/teabag.rb +0 -9
  265. data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
  266. data/spec/dummy/config/locales/en.yml +0 -5
  267. data/spec/dummy/config/routes.rb +0 -5
  268. data/spec/dummy/config.ru +0 -4
  269. data/spec/dummy/db/.gitkeep +0 -0
  270. data/spec/dummy/public/500.html +0 -25
  271. data/spec/dummy/public/blank.html +0 -1
  272. data/spec/dummy/public/favicon.ico +0 -0
  273. data/spec/dummy/public/images/bunny.gif +0 -0
  274. data/spec/dummy/public/images/bunny2.jpg +0 -0
  275. data/spec/dummy/public/index.html +0 -279
  276. data/spec/dummy/script/rails +0 -6
  277. data/spec/javascripts/fixtures/mercury/modals/insertlink.html +0 -67
  278. data/spec/javascripts/fixtures/mercury/modals/insertmedia.html +0 -87
  279. data/spec/javascripts/fixtures/mercury/modals/inserttable.html +0 -73
  280. data/spec/javascripts/fixtures/mercury/region.html +0 -6
  281. data/spec/javascripts/fixtures/mercury/regions/full.html +0 -1
  282. data/spec/javascripts/fixtures/mercury/regions/image.html +0 -1
  283. data/spec/javascripts/fixtures/mercury/regions/markdown.html +0 -1
  284. data/spec/javascripts/fixtures/mercury/regions/simple.html +0 -1
  285. data/spec/javascripts/fixtures/mercury/regions/snippets.html +0 -4
  286. data/spec/javascripts/mercury/regions/image_spec.js.coffee +0 -33
  287. data/spec/javascripts/mercury/regions/simple_spec.js.coffee +0 -32
  288. data/spec/javascripts/spec_helper.coffee +0 -4
  289. data/spec/teabag_env.rb +0 -32
@@ -0,0 +1,195 @@
1
+ @javascript
2
+ Feature:
3
+ As a content editor type person
4
+ In order to manage content
5
+ I should be able to manipulate it in various ways (eg. bold, add italics, set headers, colors, etc.)
6
+
7
+ Background:
8
+ Given I am on an editable page
9
+ And the editor won't prompt when leaving the page
10
+
11
+ Scenario: A user can expect all this!
12
+
13
+
14
+ # Scenario: A user can set and unset bold content
15
+ Given the content of the editable region is simple content
16
+ And I make a selection
17
+
18
+ When I click on the bold editor button
19
+ Then the contents of the editable region should be "this is <b><span>simple</span></b> <b>content</b>"
20
+
21
+ When I click on the bold editor button
22
+ Then the contents of the editable region should be "this is <span>simple</span> <b>content</b>"
23
+
24
+
25
+ # Scenario: A user can italicize content
26
+ Given the content of the editable region is simple content
27
+ And I make a selection
28
+
29
+ When I click on the italicize editor button
30
+ Then the contents of the editable region should be "this is <i><span>simple</span></i> <b>content</b>"
31
+
32
+ When I click on the italicize editor button
33
+ Then the contents of the editable region should be "this is <span>simple</span> <b>content</b>"
34
+
35
+
36
+ # Scenario: A user can overline content
37
+ Given the content of the editable region is simple content
38
+ And I make a selection
39
+
40
+ When I click on the overline editor button
41
+ Then the contents of the editable region should be "this is <span style='text-decoration:overline'><span>simple</span></span> <b>content</b>"
42
+ # doesn't remove overlines
43
+
44
+
45
+ # Scenario: A user can strikeout content
46
+ Given the content of the editable region is simple content
47
+ And I make a selection
48
+
49
+ When I click on the strikethrough editor button
50
+ Then the contents of the editable region should be "this is <strike><span>simple</span></strike> <b>content</b>"
51
+
52
+ When I click on the strikethrough editor button
53
+ Then the contents of the editable region should be "this is <span>simple</span> <b>content</b>"
54
+
55
+ # Scenario: A user can underline content
56
+ Given the content of the editable region is simple content
57
+ And I make a selection
58
+
59
+ When I click on the underline editor button
60
+ Then the contents of the editable region should be "this is <u><span>simple</span></u> <b>content</b>"
61
+
62
+ When I click on the underline editor button
63
+ Then the contents of the editable region should be "this is <span>simple</span> <b>content</b>"
64
+
65
+
66
+ # Scenario: A user can make content superscript
67
+ Given the content of the editable region is simple content
68
+ And I make a selection
69
+
70
+ When I click on the superscript editor button
71
+ Then the contents of the editable region should be "this is <sup><span>simple</span></sup> <b>content</b>"
72
+
73
+ When I click on the superscript editor button
74
+ Then the contents of the editable region should be "this is <span>simple</span> <b>content</b>"
75
+
76
+
77
+ # Scenario: A user can make content subscript
78
+ Given the content of the editable region is simple content
79
+ And I make a selection
80
+
81
+ When I click on the subscript editor button
82
+ Then the contents of the editable region should be "this is <sub><span>simple</span></sub> <b>content</b>"
83
+
84
+ When I click on the subscript editor button
85
+ Then the contents of the editable region should be "this is <span>simple</span> <b>content</b>"
86
+
87
+
88
+ # Scenario: A user can justify content to the left, center, right, or fully justified
89
+ # firefox: this isn't possible on the first line due to a bug in gecko, so we have special content for it
90
+ Given the content of the editable region has justifiable content
91
+ And I make a selection
92
+
93
+ When I click on the justify left editor button
94
+ Then the contents of the editable region should be "<div>first line</div><br><div align='left'>this is <span>justifiable</span><b>content</b></div> "
95
+
96
+ When I click on the justify center editor button
97
+ Then the contents of the editable region should be "<div>first line</div><br><div align='center'>this is <span>justifiable</span><b>content</b></div> "
98
+
99
+ When I click on the justify right editor button
100
+ Then the contents of the editable region should be "<div>first line</div><br><div align='right'>this is <span>justifiable</span><b>content</b></div> "
101
+
102
+ When I click on the full justification editor button
103
+ Then the contents of the editable region should be "<div>first line</div><br><div align='justify'>this is <span>justifiable</span><b>content</b></div> "
104
+
105
+
106
+ # Scenario: A user can make an unordered list
107
+ Given the content of the editable region is simple content
108
+ And I make a selection
109
+
110
+ When I click on the insert unordered list editor button
111
+ Then the contents of the editable region should be "<ul><li>this is <span>simple</span> <b>content</b></li></ul>"
112
+
113
+ # todo: we should test enter and tab, and shift+tab in advanced editing
114
+
115
+ # Scenario: A user can make an ordered list
116
+ Given the content of the editable region is simple content
117
+ And I make a selection
118
+
119
+ When I click on the insert ordered list editor button
120
+ Then the contents of the editable region should be "<ol><li>this is <span>simple</span> <b>content</b></li></ol>"
121
+
122
+ # todo: we should test enter and tab, and shift+tab in advanced editing
123
+
124
+
125
+ # Scenario: A user can indent and outdent content
126
+ # firefox: this isn't possible on the first line due to a bug in gecko, so we have special content for it
127
+ Given the content of the editable region has justifiable content
128
+ And I make a selection
129
+
130
+ When I click on the indent editor button
131
+ Then the contents of the editable region should be "<div>first line</div><br><blockquote>this is <span>justifiable</span><b>content</b></blockquote> "
132
+
133
+ When I click on the indent editor button
134
+ Then the contents of the editable region should be "<div>first line</div><br><blockquote><blockquote>this is <span>justifiable</span><b>content</b></blockquote></blockquote> "
135
+
136
+ When I click on the outdent editor button
137
+ Then the contents of the editable region should be "<div>first line</div><br><blockquote>this is <span>justifiable</span><b>content</b></blockquote> "
138
+
139
+ When I click on the outdent editor button
140
+ Then the contents of the editable region should be "<div>first line</div><br>this is <span>justifiable</span><b>content</b> "
141
+
142
+
143
+ # Scenario: A user can insert horizontal rules
144
+ Given the content of the editable region is simple content
145
+ And I make a selection
146
+
147
+ When I click on the insert hr editor button
148
+ Then the contents of the editable region should be "this is&nbsp;<hr size='2' width='100%'> <b>content</b>"
149
+
150
+ When I click on the insert hr editor button
151
+ Then the contents of the editable region should be "this is&nbsp;<hr size='2' width='100%'><hr size='2' width='100%'> <b>content</b>"
152
+
153
+
154
+ # Scenario: A user can clean/remove formatting on their selection
155
+ Given the content of the editable region has wrapped content
156
+ And I make a selection
157
+
158
+ When I click on the remove formatting editor button
159
+ Then the contents of the editable region should be "this is wrapped content"
160
+
161
+
162
+ # Scenario: A user can wrap content within predefined styles
163
+ Given the content of the editable region is simple content
164
+ And I make a selection
165
+
166
+ When I click on the style editor dropdown
167
+ And select the red style from the dropdown
168
+ Then the contents of the editable region should be "this is <span class='red'><span>simple</span></span> <b>content</b>"
169
+
170
+
171
+ # Scenario: A user can wrap content in formatted block tags
172
+ Given the content of the editable region is simple content
173
+ And I make a selection
174
+
175
+ When I click on the block format editor dropdown
176
+ And select the heading 2 block from the dropdown
177
+ Then the contents of the editable region should be "<h2>this is <span>simple</span> <b>content</b></h2>"
178
+
179
+
180
+ # Scenario: A user can set the background color of a selection
181
+ Given the content of the editable region is simple content
182
+ And I make a selection
183
+
184
+ When I click on the background color editor palette
185
+ And click on the color red
186
+ Then the contents of the editable region should be "this is <span style='background-color:#FF0000'><span>simple</span></span> <b>content</b>"
187
+
188
+
189
+ # Scenario: A user can set the foreground color
190
+ Given the content of the editable region is simple content
191
+ And I make a selection
192
+
193
+ When I click on the foreground color editor palette
194
+ And click on the color red
195
+ Then the contents of the editable region should be "this is <font color='rgb(255, 0, 0)'><span>simple</span></font> <b>content</b>"
@@ -8,11 +8,11 @@ Feature:
8
8
  Given I am on an editable page
9
9
  And the editor won't prompt when leaving the page
10
10
 
11
- # Scenario: A user can expect all this!
11
+ Scenario: A user can expect all this!
12
12
 
13
13
 
14
- Scenario: A user can insert and edit a link to an external site
15
- Given the content of the full region is simple content
14
+ # Scenario: A user can insert and edit a link to an external site
15
+ Given the content of the editable region is simple content
16
16
  And I make a selection
17
17
 
18
18
  When I click on the "Insert Link" button
@@ -21,7 +21,7 @@ Feature:
21
21
 
22
22
  When I fill in "URL" with "http://google.com"
23
23
  And press "Insert Link"
24
- Then the contents of the full region should be "this is <a href='http://google.com'>simple</a> <b>content</b>"
24
+ Then the contents of the editable region should be "this is <a href='http://google.com'>simple</a> <b>content</b>"
25
25
  And the modal window should not be visible
26
26
 
27
27
  When I click on the "Insert Link" button
@@ -29,27 +29,27 @@ Feature:
29
29
 
30
30
  When I fill in "URL" with "http://cnn.com"
31
31
  And press "Insert Link"
32
- Then the contents of the full region should be "this is <a href='http://cnn.com'>simple</a> <b>content</b>"
32
+ Then the contents of the editable region should be "this is <a href='http://cnn.com'>simple</a> <b>content</b>"
33
33
 
34
34
 
35
- Scenario: A user can insert and edit a link with a target set
36
- Given the content of the full region is simple content
35
+ # Scenario: A user can insert and edit a link with a target set
36
+ Given the content of the editable region is simple content
37
37
  And I make a selection
38
38
 
39
39
  When I click on the "Insert Link" button
40
40
  And fill in "URL" with "http://google.com"
41
41
  And select "Blank (a new window or tab)" from "Link Target"
42
42
  And press "Insert Link"
43
- Then the contents of the full region should be "this is <a target='_blank' href='http://google.com'>simple</a> <b>content</b>"
43
+ Then the contents of the editable region should be "this is <a target='_blank' href='http://google.com'>simple</a> <b>content</b>"
44
44
 
45
45
  When I click on the "Insert Link" button
46
46
  And select "Top (removes any frames)" from "Link Target"
47
47
  And press "Insert Link"
48
- Then the contents of the full region should be "this is <a target='_top' href='http://google.com'>simple</a> <b>content</b>"
48
+ Then the contents of the editable region should be "this is <a target='_top' href='http://google.com'>simple</a> <b>content</b>"
49
49
 
50
50
 
51
- Scenario: A user can insert a link to an external site and open it in a popup
52
- Given the content of the full region is simple content
51
+ # Scenario: A user can insert a link to an external site and open it in a popup
52
+ Given the content of the editable region is simple content
53
53
  And I make a selection
54
54
 
55
55
  When I click on the "Insert Link" button
@@ -58,29 +58,29 @@ Feature:
58
58
  And I fill in "Popup Width" with "500"
59
59
  And fill in "Popup Height" with "200"
60
60
  And press "Insert Link"
61
- Then the contents of the full region should be "this is <a href='javascript:void(window.open('http://google.com', 'popup_window', 'width=500,height=200,menubar=no,toolbar=no'))'>simple</a> <b>content</b>"
61
+ Then the contents of the editable region should be "this is <a href='javascript:void(window.open('http://google.com', 'popup_window', 'width=500,height=200,menubar=no,toolbar=no'))'>simple</a> <b>content</b>"
62
62
 
63
63
  When I click on the "Insert Link" button
64
64
  Then the "Popup Width" field should contain "500"
65
65
  And the "Popup Height" field should contain "200"
66
66
 
67
67
 
68
- Scenario: A user can insert a bookmark and then link to it
69
- Given the content of the full region is simple content
68
+ # Scenario: A user can insert a bookmark and then link to it
69
+ Given the content of the editable region is simple content
70
70
  And I make a selection
71
71
 
72
72
  When I click on the "Insert Link" button
73
73
  And I choose "Bookmark"
74
74
  And fill in "Bookmark" with "test-bookmark1"
75
75
  And press "Insert Link"
76
- Then the contents of the full region should be "this is <a name='test-bookmark1'>simple</a> <b>content</b>"
76
+ Then the contents of the editable region should be "this is <a name='test-bookmark1'>simple</a> <b>content</b>"
77
77
 
78
78
  When I make a selection for "b"
79
79
  And click on the "Insert Link" button
80
80
  And I choose "Existing Links"
81
81
  And select "simple" from "Existing Links"
82
82
  And press "Insert Link"
83
- Then the contents of the full region should be "this is <a name='test-bookmark1'>simple</a> <a href='#test-bookmark1'>content</a>"
83
+ Then the contents of the editable region should be "this is <a name='test-bookmark1'>simple</a> <a href='#test-bookmark1'>content</a>"
84
84
 
85
85
  When I make a selection for "a"
86
86
  And click on the "Insert Link" button
@@ -89,11 +89,10 @@ Feature:
89
89
  And I choose "Bookmark"
90
90
  And fill in "Bookmark" with "test-bookmark2"
91
91
  And press "Insert Link"
92
- Then the contents of the full region should be "this is <a name='test-bookmark2'>simple</a> <a href='#test-bookmark1'>content</a>"
92
+ Then the contents of the editable region should be "this is <a name='test-bookmark2'>simple</a> <a href='#test-bookmark1'>content</a>"
93
93
 
94
94
  # todo: when I change the name of a bookmark, and bookmarks that are pointing to me should also be updated (on this page)
95
95
 
96
96
 
97
- # Scenario: A user can navigate links inside of regions
98
- # todo: finish
99
-
97
+ Scenario: A user can navigate links inside of regions
98
+ # todo: finish
@@ -12,7 +12,7 @@ Feature:
12
12
 
13
13
 
14
14
  # Scenario: A user can insert and edit an image
15
- Given the content of the full region is simple content
15
+ Given the content of the editable region is simple content
16
16
  And I make a selection
17
17
 
18
18
  When I click on the "Insert Media" button
@@ -21,7 +21,7 @@ Feature:
21
21
 
22
22
  When I fill in "URL" with "/assets/mercury/temp-logo.png"
23
23
  And press "Insert Media"
24
- Then the contents of the full region should be "this is <img src='/assets/mercury/temp-logo.png'> <b>content</b>"
24
+ Then the contents of the editable region should be "this is <img src='/assets/mercury/temp-logo.png'> <b>content</b>"
25
25
  And the modal window should not be visible
26
26
 
27
27
  When I make a selection for "img"
@@ -30,48 +30,30 @@ Feature:
30
30
 
31
31
  When I fill in "URL" with "/assets/mercury/default-snippet.png"
32
32
  And press "Insert Media"
33
- Then the contents of the full region should be "this is <img src='/assets/mercury/default-snippet.png'> <b>content</b>"
33
+ Then the contents of the editable region should be "this is <img src='/assets/mercury/default-snippet.png'> <b>content</b>"
34
34
 
35
35
 
36
36
  # Scenario: A user can insert and edit an image with an alignment set
37
- Given the content of the full region is simple content
37
+ Given the content of the editable region is simple content
38
38
  And I make a selection
39
39
 
40
40
  When I click on the "Insert Media" button
41
41
  When I fill in "media_image_url" with "/assets/mercury/temp-logo.png"
42
42
  And select "Right" from "Alignment"
43
43
  And press "Insert Media"
44
- Then the contents of the full region should be "this is <img src='/assets/mercury/temp-logo.png' align='right'> <b>content</b>"
44
+ Then the contents of the editable region should be "this is <img src='/assets/mercury/temp-logo.png' align='right'> <b>content</b>"
45
45
 
46
46
  When I make a selection for "img"
47
47
  And click on the "Insert Media" button
48
48
  And select "Absolute Middle" from "Alignment"
49
49
  And press "Insert Media"
50
- Then the contents of the full region should be "this is <img src='/assets/mercury/temp-logo.png' align='absmiddle'> <b>content</b>"
51
-
52
- # Scenario: A user can insert and edit an image with an explicit float setting
53
- Given the content of the full region is simple content
54
- And I make a selection
55
-
56
- When I click on the "Insert Media" button
57
- When I fill in "media_image_url" with "/assets/mercury/temp-logo.png"
58
- And select "Right" from "Float"
59
- And press "Insert Media"
60
- Then the contents of the full region should be "this is <img style='float: right;' src='/assets/mercury/temp-logo.png'> <b>content</b>"
61
-
62
- When I make a selection for "img"
63
- And click on the "Insert Media" button
64
- And select "Absolute Middle" from "Alignment"
65
- And select "None" from "Float"
66
- And press "Insert Media"
67
- Then the contents of the full region should be "this is <img src='/assets/mercury/temp-logo.png' align='absmiddle'> <b>content</b>"
68
-
50
+ Then the contents of the editable region should be "this is <img src='/assets/mercury/temp-logo.png' align='absmiddle'> <b>content</b>"
69
51
 
70
52
 
71
53
  Scenario: A user can edit an image by double clicking it
72
- Given the content of the full region has an image
54
+ Given the content of the editable region has an image
73
55
 
74
- When I double click on the first image in the full region
56
+ When I double click on the first image in the editable region
75
57
  Then the modal window should be visible
76
58
  And I should see "Insert Media (images and videos)" within the modal title
77
59
  And the "media_image_url" field should contain "/assets/mercury/temp-logo.png"
@@ -79,34 +61,34 @@ Feature:
79
61
  When I fill in "URL" with "/assets/mercury/default-snippet.png"
80
62
  And select "Absolute Middle" from "Alignment"
81
63
  And press "Insert Media"
82
- Then the contents of the full region should be "this is <img src='/assets/mercury/default-snippet.png' align='absmiddle'> <b>content</b>"
64
+ Then the contents of the editable region should be "this is <img src='/assets/mercury/default-snippet.png' align='absmiddle'> <b>content</b>"
83
65
 
84
66
 
85
67
  Scenario: A user can embed and edit a youtube video
86
- Given the content of the full region is simple content
68
+ Given the content of the editable region is simple content
87
69
  And I make a selection
88
70
 
89
71
  When I click on the "Insert Media" button
90
- And choose "YouTube URL"
91
- And fill in "YouTube URL" with "http://youtu.be/Pny4hoN8eII"
72
+ And choose "YouTube Share URL"
73
+ And fill in "YouTube Share URL" with "http://youtu.be/Pny4hoN8eII"
92
74
  And fill in "Width" with "400"
93
75
  And fill in "Height" with "200"
94
76
  And press "Insert Media"
95
- Then the contents of the full region should be "this is <iframe allowfullscreen='true' src='http://www.youtube.com/embed/Pny4hoN8eII?wmode=transparent' style='width: 400px; height: 200px;' frameborder='0'></iframe> <b>content</b>"
77
+ Then the contents of the editable region should be "this is <iframe allowfullscreen='true' src='http://www.youtube.com/embed/Pny4hoN8eII?wmode=transparent' style='width: 400px; height: 200px;' frameborder='0'></iframe> <b>content</b>"
96
78
 
97
79
  When I make a selection for "iframe"
98
80
  And click on the "Insert Media" button
99
81
  Then the "media_youtube_url" field should contain "http://youtu.be/Pny4hoN8eII"
100
82
 
101
- When I fill in "YouTube URL" with "http://youtu.be/Pny4hoN8eI"
83
+ When I fill in "YouTube Share URL" with "http://youtu.be/Pny4hoN8eI"
102
84
  And fill in "Width" with "500"
103
85
  And fill in "Height" with "300"
104
86
  And press "Insert Media"
105
- Then the contents of the full region should be "this is <iframe allowfullscreen='true' src='http://www.youtube.com/embed/Pny4hoN8eI?wmode=transparent' style='width: 500px; height: 300px;' frameborder='0'></iframe> <b>content</b>"
87
+ Then the contents of the editable region should be "this is <iframe allowfullscreen='true' src='http://www.youtube.com/embed/Pny4hoN8eI?wmode=transparent' style='width: 500px; height: 300px;' frameborder='0'></iframe> <b>content</b>"
106
88
 
107
89
 
108
90
  # Scenario: A user can embed and edit a vimeo video
109
- Given the content of the full region is simple content
91
+ Given the content of the editable region is simple content
110
92
  And I make a selection
111
93
 
112
94
  When I click on the "Insert Media" button
@@ -115,7 +97,7 @@ Feature:
115
97
  And fill in "Width" with "400"
116
98
  And fill in "Height" with "200"
117
99
  And press "Insert Media"
118
- Then the contents of the full region should be "this is <iframe src='http://player.vimeo.com/video/25708134?title=1&amp;byline=1&amp;portrait=0&amp;color=ffffff' style='width: 400px; height: 200px;' frameborder='0'></iframe> <b>content</b>"
100
+ Then the contents of the editable region should be "this is <iframe src='http://player.vimeo.com/video/25708134?title=1&amp;byline=1&amp;portrait=0&amp;color=ffffff' style='width: 400px; height: 200px;' frameborder='0'></iframe> <b>content</b>"
119
101
 
120
102
  When I make a selection for "iframe"
121
103
  And click on the "Insert Media" button
@@ -125,4 +107,4 @@ Feature:
125
107
  And fill in "Width" with "500"
126
108
  And fill in "Height" with "300"
127
109
  And press "Insert Media"
128
- Then the contents of the full region should be "this is <iframe src='http://player.vimeo.com/video/2570813?title=1&amp;byline=1&amp;portrait=0&amp;color=ffffff' style='width: 500px; height: 300px;' frameborder='0'></iframe> <b>content</b>"
110
+ Then the contents of the editable region should be "this is <iframe src='http://player.vimeo.com/video/2570813?title=1&amp;byline=1&amp;portrait=0&amp;color=ffffff' style='width: 500px; height: 300px;' frameborder='0'></iframe> <b>content</b>"
@@ -12,12 +12,12 @@ Feature:
12
12
 
13
13
 
14
14
  # todo: these can't be one scenario because snippet.load doesn't find/replace existing ones
15
- Scenario: A user can drag and drop snippets into a full region
16
- Given the content of the full region is simple content
15
+ Scenario: A user can drag and drop snippets into an editable region
16
+ Given the content of the editable region is simple content
17
17
  And I make a selection
18
18
 
19
19
  When I open the snippet panel
20
- And I drag the example snippet into the full region
20
+ And I drag the example snippet into the editable region
21
21
  Then the modal window should be visible
22
22
  And I should see "Snippet Options" within the modal title
23
23
 
@@ -25,34 +25,23 @@ Feature:
25
25
  And fill in "Favorite Beer" with "Stella"
26
26
  And press "Insert Snippet"
27
27
  Then the modal window should not be visible
28
- And the contents of the full region should be "this is <div data-version='1' data-snippet='snippet_14' class='example-snippet' contenteditable='false'><strong>Jeremy</strong> likes Stella</div><span>simple</span> <b>content</b>"
29
-
30
-
31
- Scenario: A user can drag and drop snippets with no options into a full region
32
- Given the content of the full region is simple content
33
- And I make a selection
34
-
35
- When I open the snippet panel
36
- And I drag the snippet with no options into the full region
37
- Then the modal window should not be visible
38
-
39
- And the contents of the full region should be "this is <div data-version='1' data-snippet='snippet_14' class='no_options-snippet' contenteditable='false'><strong>No Option Snippet</strong></div><span>simple</span> <b>content</b>"
28
+ And the contents of the editable region should be "this is <div data-version='1' data-snippet='snippet_14' class='mercury-snippet' contenteditable='false'><strong>Jeremy</strong> likes Stella</div><span>simple</span> <b>content</b>"
40
29
 
41
30
 
42
31
  Scenario: A user can use the snippet toolbar to remove a snippet
43
32
  Given the options for the example snippet "snippet_42" are first_name: "Jeremy", favorite_beer: "Stella"
44
- And the content of the full region has that snippet
33
+ And the content of the editable region has that snippet
45
34
 
46
35
  When I hover over the snippet
47
36
  Then the snippet toolbar should be visible
48
37
 
49
38
  When I click on the remove snippet toolbar button
50
- Then the contents of the full region should be " <b>content</b>"
39
+ Then the contents of the editable region should be " <b>content</b>"
51
40
 
52
41
 
53
42
  Scenario: A user can use the snippet toolbar to edit the options of a snippet
54
43
  Given the options for the example snippet "snippet_42" are first_name: "Hipsters", favorite_beer: "PBR"
55
- And the content of the full region has that snippet
44
+ And the content of the editable region has that snippet
56
45
 
57
46
  When I hover over the snippet
58
47
  And click on the edit snippet settings toolbar button
@@ -63,18 +52,18 @@ Feature:
63
52
  When I fill in "First Name" with "Jeremy"
64
53
  And fill in "Favorite Beer" with "Stella"
65
54
  And press "Insert Snippet"
66
- Then the contents of the full region should be "<div data-version='2' data-snippet='snippet_42' class='example-snippet' contenteditable='false'><strong>Jeremy</strong> likes Stella</div> <b>content</b>"
55
+ Then the contents of the editable region should be "<div data-version='2' data-snippet='snippet_42' class='mercury-snippet' contenteditable='false'><strong>Jeremy</strong> likes Stella</div> <b>content</b>"
67
56
 
68
57
 
69
58
  Scenario: A user can make changes to a snippets options, and they'll be versioned for undo and redo
70
59
  Given the options for the example snippet "snippet_42" are first_name: "Hipsters", favorite_beer: "PBR"
71
- And the content of the full region has that snippet
60
+ And the content of the editable region has that snippet
72
61
 
73
62
  When I edit the snippet
74
63
  And I fill in "First Name" with "Jeremy"
75
64
  And fill in "Favorite Beer" with "Stella"
76
65
  And press "Insert Snippet"
77
- Then the contents of the full region should be "<div data-version='2' data-snippet='snippet_42' class='example-snippet' contenteditable='false'><strong>Jeremy</strong> likes Stella</div> <b>content</b>"
66
+ Then the contents of the editable region should be "<div data-version='2' data-snippet='snippet_42' class='mercury-snippet' contenteditable='false'><strong>Jeremy</strong> likes Stella</div> <b>content</b>"
78
67
 
79
68
  When I edit the snippet
80
69
  Then the "First Name" field should contain "Jeremy"
@@ -83,18 +72,19 @@ Feature:
83
72
  When fill in "First Name" with "Diesel"
84
73
  And fill in "Favorite Beer" with "Bells Hopslam"
85
74
  And press "Insert Snippet"
86
- Then the content of the full region should be "<div data-version='3' data-snippet='snippet_42' class='example-snippet' contenteditable='false'><strong>Diesel</strong> likes Bells Hopslam</div> <b>content</b>"
75
+ Then the content of the editable region should be "<div data-version='3' data-snippet='snippet_42' class='mercury-snippet' contenteditable='false'><strong>Diesel</strong> likes Bells Hopslam</div> <b>content</b>"
87
76
 
88
77
  When I click on the "Undo" button
89
- Then the contents of the full region should be "<div data-version='2' data-snippet='snippet_42' class='example-snippet' contenteditable='false'><strong>Jeremy</strong> likes Stella</div> <b>content</b>"
78
+ Then the contents of the editable region should be "<div data-version='2' data-snippet='snippet_42' class='mercury-snippet' contenteditable='false'><strong>Jeremy</strong> likes Stella</div> <b>content</b>"
90
79
 
91
80
  When I edit the snippet
92
- Then the "First Name" field should contain "Jeremy"
93
- And the "Favorite Beer" field should contain "Stella"
81
+ # todo: this is a bug
82
+ # Then the "First Name" field should contain "Jeremy"
83
+ # And the "Favorite Beer" field should contain "Stella"
94
84
 
95
85
  When I close the modal
96
86
  When I click on the "Redo" button
97
- Then the contents of the full region should be "<div data-version='3' data-snippet='snippet_42' class='example-snippet' contenteditable='false'><strong>Diesel</strong> likes Bells Hopslam</div> <b>content</b>"
87
+ Then the contents of the editable region should be "<div data-version='3' data-snippet='snippet_42' class='mercury-snippet' contenteditable='false'><strong>Diesel</strong> likes Bells Hopslam</div> <b>content</b>"
98
88
 
99
89
  When I edit the snippet
100
90
  Then the "First Name" field should contain "Diesel"
@@ -103,10 +93,10 @@ Feature:
103
93
  When I fill in "First Name" with "Jen"
104
94
  And fill in "Favorite Beer" with "Miller High Life"
105
95
  And press "Insert Snippet"
106
- Then the contents of the full region should be "<div data-version='4' data-snippet='snippet_42' class='example-snippet' contenteditable='false'><strong>Jen</strong> likes Miller High Life</div> <b>content</b>"
96
+ Then the contents of the editable region should be "<div data-version='4' data-snippet='snippet_42' class='mercury-snippet' contenteditable='false'><strong>Jen</strong> likes Miller High Life</div> <b>content</b>"
107
97
 
108
98
 
109
99
  # Scenario: When a user saves, the snippets should be gone from the html, but the options are serialized
110
100
  # Given the options for the example snippet "snippet_42" are first_name: "Hipsters", favorite_beer: "PBR"
111
- # And the content of the full region has that snippet
101
+ # And the content of the editable region has that snippet
112
102
  # When I click on the "Save" button
@@ -12,7 +12,7 @@ Feature:
12
12
 
13
13
 
14
14
  # Scenario: A user can insert special characters
15
- Given the content of the full region is simple content
15
+ Given the content of the editable region is simple content
16
16
  And I make a selection
17
17
 
18
18
  When I click on the "Insert Character" button
@@ -21,4 +21,4 @@ Feature:
21
21
 
22
22
  When I click on the sweet snowman
23
23
  Then the modal window should not be visible
24
- And the contents of the full region should be "this is ☃ <b>content</b>"
24
+ And the contents of the editable region should be "this is ☃ <b>content</b>"