kiteditor 1.0.11 → 1.0.12
Sign up to get free protection for your applications and to get access to all the features.
- data/POST_INSTALL +21 -0
- data/{vendor → app}/assets/images/mercury/button.png +0 -0
- data/{vendor → app}/assets/images/mercury/close.png +0 -0
- data/app/assets/images/mercury/default-snippet.png +0 -0
- data/{vendor → app}/assets/images/mercury/loading-dark.gif +0 -0
- data/{vendor → app}/assets/images/mercury/loading-light.gif +0 -0
- data/{vendor → app}/assets/images/mercury/missing-image.png +0 -0
- data/{vendor → app}/assets/images/mercury/search-icon.png +0 -0
- data/{vendor → app}/assets/images/mercury/temp-logo.png +0 -0
- data/app/assets/images/mercury/toolbar/editable/buttons.png +0 -0
- data/app/assets/images/mercury/toolbar/primary/_expander.png +0 -0
- data/app/assets/images/mercury/toolbar/primary/_pressed.png +0 -0
- data/app/assets/images/mercury/toolbar/primary/action.png +0 -0
- data/app/assets/images/mercury/toolbar/primary/historypanel.png +0 -0
- data/app/assets/images/mercury/toolbar/primary/insertcharacter.png +0 -0
- data/app/assets/images/mercury/toolbar/primary/insertlink.png +0 -0
- data/app/assets/images/mercury/toolbar/primary/insertmedia.png +0 -0
- data/app/assets/images/mercury/toolbar/primary/inserttable.png +0 -0
- data/app/assets/images/mercury/toolbar/primary/inspectorpanel.png +0 -0
- data/app/assets/images/mercury/toolbar/primary/notespanel.png +0 -0
- data/app/assets/images/mercury/toolbar/primary/preview.png +0 -0
- data/app/assets/images/mercury/toolbar/primary/redo.png +0 -0
- data/app/assets/images/mercury/toolbar/primary/save.png +0 -0
- data/app/assets/images/mercury/toolbar/primary/snippetpanel.png +0 -0
- data/app/assets/images/mercury/toolbar/primary/tools.png +0 -0
- data/app/assets/images/mercury/toolbar/primary/undo.png +0 -0
- data/app/assets/images/mercury/toolbar/primary/user.png +0 -0
- data/app/assets/images/mercury/toolbar/snippets/buttons.png +0 -0
- data/{vendor/assets/javascripts/mercury/dependencies → app/assets/javascripts}/jquery-1.7.js +0 -0
- data/{vendor → app}/assets/javascripts/mercury.js +60 -87
- data/{vendor → app}/assets/javascripts/mercury/dependencies/jquery-ui-1.8.13.custom.js +0 -0
- data/{vendor → app}/assets/javascripts/mercury/dependencies/jquery.additions.js +103 -13
- data/{vendor → app}/assets/javascripts/mercury/dependencies/jquery.htmlClean.js +0 -0
- data/{vendor → app}/assets/javascripts/mercury/dependencies/liquidmetal.js +0 -0
- data/{vendor → app}/assets/javascripts/mercury/dependencies/showdown.js +0 -0
- data/{vendor → app}/assets/javascripts/mercury/dialog.js.coffee +0 -0
- data/{vendor → app}/assets/javascripts/mercury/dialogs/backcolor.js.coffee +0 -0
- data/{vendor → app}/assets/javascripts/mercury/dialogs/forecolor.js.coffee +1 -1
- data/{vendor → app}/assets/javascripts/mercury/dialogs/formatblock.js.coffee +0 -0
- data/{vendor → app}/assets/javascripts/mercury/dialogs/snippetpanel.js.coffee +1 -1
- data/{vendor → app}/assets/javascripts/mercury/dialogs/style.js.coffee +0 -0
- data/{vendor → app}/assets/javascripts/mercury/finalize.js.coffee +0 -0
- data/{vendor → app}/assets/javascripts/mercury/history_buffer.js.coffee +0 -0
- data/{vendor → app}/assets/javascripts/mercury/lightview.js.coffee +38 -17
- data/app/assets/javascripts/mercury/locales/ar.locale.js.coffee +201 -0
- data/app/assets/javascripts/mercury/locales/da.locale.js.coffee +208 -0
- data/{vendor → app}/assets/javascripts/mercury/locales/de.locale.js.coffee +4 -10
- data/{vendor → app}/assets/javascripts/mercury/locales/es.locale.js.coffee +3 -9
- data/{vendor → app}/assets/javascripts/mercury/locales/example.local.js.coffee +3 -5
- data/{vendor → app}/assets/javascripts/mercury/locales/fr.locale.js.coffee +3 -9
- data/app/assets/javascripts/mercury/locales/hu.locale.js.coffee +209 -0
- data/{vendor → app}/assets/javascripts/mercury/locales/it.locale.js.coffee +3 -9
- data/{vendor → app}/assets/javascripts/mercury/locales/ko.local.js.coffee +4 -10
- data/{vendor → app}/assets/javascripts/mercury/locales/nl.locale.js.coffee +3 -9
- data/app/assets/javascripts/mercury/locales/pl.locale.js.coffee +213 -0
- data/{vendor → app}/assets/javascripts/mercury/locales/pt.locale.js.coffee +3 -9
- data/app/assets/javascripts/mercury/locales/ru.locale.js.coffee +200 -0
- data/{vendor → app}/assets/javascripts/mercury/locales/sv.local.js.coffee +3 -9
- data/{vendor → app}/assets/javascripts/mercury/locales/swedish_chef.locale.js.coffee +3 -9
- data/app/assets/javascripts/mercury/locales/uk.locale.js.coffee +200 -0
- data/app/assets/javascripts/mercury/locales/zh.local.js.coffee +203 -0
- data/app/assets/javascripts/mercury/mercury-compiled.js +10720 -0
- data/{vendor → app}/assets/javascripts/mercury/mercury.js.coffee +10 -1
- data/{vendor → app}/assets/javascripts/mercury/modal.js.coffee +62 -40
- data/{vendor → app}/assets/javascripts/mercury/modals/htmleditor.js.coffee +1 -0
- data/{vendor → app}/assets/javascripts/mercury/modals/insertcharacter.js.coffee +1 -0
- data/app/assets/javascripts/mercury/modals/insertlink.js.coffee +152 -0
- data/app/assets/javascripts/mercury/modals/insertmedia.js.coffee +132 -0
- data/{vendor → app}/assets/javascripts/mercury/modals/insertsnippet.js.coffee +2 -0
- data/app/assets/javascripts/mercury/modals/inserttable.js.coffee +68 -0
- data/{vendor → app}/assets/javascripts/mercury/native_extensions.js.coffee +0 -6
- data/{vendor → app}/assets/javascripts/mercury/page_editor.js.coffee +84 -50
- data/{vendor → app}/assets/javascripts/mercury/palette.js.coffee +1 -1
- data/{vendor → app}/assets/javascripts/mercury/panel.js.coffee +3 -2
- data/{vendor → app}/assets/javascripts/mercury/plugins/save_as_xml/mercury/page_editor.js.coffee +2 -2
- data/{vendor → app}/assets/javascripts/mercury/plugins/save_as_xml/plugin.js +0 -0
- data/{vendor → app}/assets/javascripts/mercury/region.js.coffee +18 -17
- data/{vendor/assets/javascripts/mercury/regions/editable.js.coffee → app/assets/javascripts/mercury/regions/full.js.coffee} +41 -31
- data/app/assets/javascripts/mercury/regions/image.js.coffee +93 -0
- data/{vendor/assets/javascripts/mercury/regions/markupable.js.coffee → app/assets/javascripts/mercury/regions/markdown.js.coffee} +29 -24
- data/{vendor → app}/assets/javascripts/mercury/regions/simple.js.coffee +11 -54
- data/{vendor/assets/javascripts/mercury/regions/snippetable.js.coffee → app/assets/javascripts/mercury/regions/snippets.js.coffee} +10 -9
- data/{vendor → app}/assets/javascripts/mercury/select.js.coffee +1 -1
- data/app/assets/javascripts/mercury/snippet.js.coffee +136 -0
- data/{vendor → app}/assets/javascripts/mercury/snippet_toolbar.js.coffee +19 -6
- data/{vendor → app}/assets/javascripts/mercury/statusbar.js.coffee +0 -0
- data/{vendor → app}/assets/javascripts/mercury/support/history.js +0 -0
- data/{vendor → app}/assets/javascripts/mercury/table_editor.js.coffee +16 -0
- data/{vendor → app}/assets/javascripts/mercury/toolbar.button.js.coffee +45 -30
- data/{vendor → app}/assets/javascripts/mercury/toolbar.button_group.js.coffee +2 -2
- data/{vendor → app}/assets/javascripts/mercury/toolbar.expander.js.coffee +4 -4
- data/{vendor → app}/assets/javascripts/mercury/toolbar.js.coffee +10 -6
- data/{vendor → app}/assets/javascripts/mercury/tooltip.js.coffee +0 -0
- data/{vendor → app}/assets/javascripts/mercury/uploader.js.coffee +37 -19
- data/app/assets/stylesheets/_mercury-bootstrap-overrides.scss +61 -0
- data/app/assets/stylesheets/_mercury-sass.scss +33 -0
- data/{vendor → app}/assets/stylesheets/mercury.css +1 -5
- data/{vendor → app}/assets/stylesheets/mercury/all_images.css.erb +6 -2
- data/app/assets/stylesheets/mercury/bootstrap-ish.css +1367 -0
- data/app/assets/stylesheets/mercury/bootstrap-overrides.css +61 -0
- data/{vendor → app}/assets/stylesheets/mercury/dialog.css +21 -8
- data/{vendor → app}/assets/stylesheets/mercury/lightview.css +6 -56
- data/app/assets/stylesheets/mercury/mercury.css +43 -0
- data/{vendor → app}/assets/stylesheets/mercury/modal.css +15 -32
- data/{vendor → app}/assets/stylesheets/mercury/statusbar.css +0 -0
- data/{vendor → app}/assets/stylesheets/mercury/toolbar.css +4 -1
- data/{vendor → app}/assets/stylesheets/mercury/tooltip.css +0 -0
- data/{vendor → app}/assets/stylesheets/mercury/uploader.css +4 -4
- data/app/helpers/mercury_helper.rb +7 -0
- data/app/views/layouts/mercury.html.erb +10 -20
- data/app/views/layouts/mercury.html.haml +19 -0
- data/app/views/layouts/mercury.html.slim +19 -0
- data/app/views/mercury/modals/character.html +1 -1
- data/app/views/mercury/modals/htmleditor.html +3 -7
- data/app/views/mercury/modals/link.html +37 -51
- data/app/views/mercury/modals/media.html +102 -0
- data/app/views/mercury/modals/table.html +79 -73
- data/app/views/mercury/panels/snippets.html +6 -1
- data/app/views/mercury/snippets/example/options.html.erb +23 -27
- data/app/views/mercury/snippets/no_options/preview.html.erb +1 -0
- data/config/routes.rb +9 -0
- data/features/generators/authentication.feature +10 -0
- data/features/generators/images.feature +41 -0
- data/features/generators/install.feature +21 -0
- data/features/loading/loading.feature +5 -2
- data/features/loading/user_interface.feature +9 -7
- data/features/regions/{editable → full}/advanced_editing.feature +0 -0
- data/features/regions/full/basic_editing.feature +198 -0
- data/features/regions/{editable → full}/inserting_links.feature +20 -19
- data/features/regions/{editable → full}/inserting_media.feature +36 -18
- data/features/regions/{editable → full}/inserting_snippets.feature +28 -18
- data/features/regions/{editable → full}/inserting_special_characters.feature +2 -2
- data/features/regions/full/inserting_tables.feature +109 -0
- data/features/regions/{editable → full}/pasting.feature +0 -0
- data/features/regions/{editable → full}/uploading_images.feature +0 -0
- data/features/regions/{markupable → image}/uploading_images.feature +0 -0
- data/features/regions/{markupable → markdown}/advanced_editing.feature +0 -0
- data/features/regions/{markupable → markdown}/basic_editing.feature +0 -0
- data/features/regions/{markupable → markdown}/inserting_links.feature +0 -0
- data/features/regions/{markupable → markdown}/inserting_media.feature +0 -0
- data/features/regions/{markupable → markdown}/inserting_snippets.feature +0 -0
- data/features/regions/{markupable → markdown}/inserting_special_characters.feature +0 -0
- data/features/regions/{markupable → markdown}/inserting_tables.feature +0 -0
- data/features/regions/{snippetable/advanced_editing.feature → markdown/uploading_images.feature} +0 -0
- data/features/regions/simple/basic_editing.feature +5 -0
- data/features/regions/{snippetable/basic_editing.feature → snippets/advanced_editing.feature} +0 -0
- data/features/regions/{snippetable/inserting_snippets.feature → snippets/basic_editing.feature} +0 -0
- data/{vendor/assets/javascripts/mercury/locales/da.locale.js.coffee → features/regions/snippets/inserting_snippets.feature} +0 -0
- data/features/saving/saving.feature +8 -8
- data/features/step_definitions/custom_web_steps.rb +22 -0
- data/features/step_definitions/generator_steps.rb +23 -0
- data/features/step_definitions/mercury_steps.rb +1 -438
- data/features/support/aruba.rb +28 -0
- data/features/support/env.rb +11 -1
- data/features/support/selectors.rb +23 -0
- data/lib/generators/mercury/install/authentication/authentication_generator.rb +17 -0
- data/lib/generators/mercury/install/images/images_generator.rb +47 -0
- data/{app/models/mercury/image.rb → lib/generators/mercury/install/images/templates/ar_paperclip_image.rb} +7 -0
- data/{db/migrate/20110526035601_create_mercury_images.rb → lib/generators/mercury/install/images/templates/ar_paperclip_image_migration.rb} +0 -0
- data/{app/controllers/mercury → lib/generators/mercury/install/images/templates}/images_controller.rb +0 -0
- data/lib/generators/mercury/install/{templates → images/templates}/mongoid_paperclip_image.rb +0 -0
- data/lib/generators/mercury/install/install_generator.rb +12 -23
- data/lib/mercury-rails.rb +1 -2
- data/lib/mercury/authentication.rb +1 -0
- data/lib/mercury/cucumber/step_definitions.rb +13 -0
- data/lib/mercury/cucumber/step_definitions/mercury_steps.rb +408 -0
- data/{features → lib/mercury/cucumber}/support/mercury_contents.rb +3 -3
- data/{features → lib/mercury/cucumber}/support/mercury_selectors.rb +0 -20
- data/lib/mercury/engine.rb +19 -0
- data/lib/mercury/rails.rb +5 -0
- data/lib/mercury/version.rb +3 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/assets/javascripts/application.js +0 -0
- data/spec/dummy/app/assets/javascripts/prototype.js +6082 -0
- data/spec/dummy/app/assets/stylesheets/application.css.scss +110 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/app/views/layouts/mercury.html.erb +28 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +58 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/database.yml +10 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +37 -0
- data/spec/dummy/config/environments/production.rb +67 -0
- data/spec/dummy/config/environments/test.rb +37 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/inflections.rb +15 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/initializers/teabag.rb +9 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/routes.rb +5 -0
- data/spec/dummy/db/.gitkeep +0 -0
- data/spec/dummy/public/500.html +25 -0
- data/spec/dummy/public/blank.html +1 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/public/images/bunny.gif +0 -0
- data/spec/dummy/public/images/bunny2.jpg +0 -0
- data/spec/dummy/public/index.html +279 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/javascripts/{templates → fixtures}/mercury/dialog.html +0 -0
- data/spec/javascripts/{templates → fixtures}/mercury/dialogs/backcolor.html +0 -0
- data/spec/javascripts/{templates → fixtures}/mercury/dialogs/forecolor.html +0 -0
- data/spec/javascripts/{templates → fixtures}/mercury/dialogs/formatblock.html +0 -0
- data/spec/javascripts/{templates → fixtures}/mercury/dialogs/snippetpanel.html +0 -0
- data/spec/javascripts/{templates → fixtures}/mercury/dialogs/style.html +0 -0
- data/spec/javascripts/{templates → fixtures}/mercury/lightview.html +0 -0
- data/spec/javascripts/{templates → fixtures}/mercury/modal.html +0 -0
- data/spec/javascripts/{templates → fixtures}/mercury/modals/htmleditor.html +0 -0
- data/spec/javascripts/{templates → fixtures}/mercury/modals/insertcharacter.html +0 -0
- data/spec/javascripts/fixtures/mercury/modals/insertlink.html +67 -0
- data/spec/javascripts/fixtures/mercury/modals/insertmedia.html +87 -0
- data/spec/javascripts/{templates → fixtures}/mercury/modals/insertsnippet.html +0 -0
- data/spec/javascripts/fixtures/mercury/modals/inserttable.html +73 -0
- data/spec/javascripts/{templates → fixtures}/mercury/page_editor.html +4 -4
- data/spec/javascripts/{templates → fixtures}/mercury/palette.html +0 -0
- data/spec/javascripts/{templates → fixtures}/mercury/panel.html +0 -0
- data/spec/javascripts/fixtures/mercury/region.html +6 -0
- data/spec/javascripts/fixtures/mercury/regions/full.html +1 -0
- data/spec/javascripts/fixtures/mercury/regions/image.html +1 -0
- data/spec/javascripts/fixtures/mercury/regions/markdown.html +1 -0
- data/spec/javascripts/fixtures/mercury/regions/simple.html +1 -0
- data/spec/javascripts/fixtures/mercury/regions/snippets.html +4 -0
- data/spec/javascripts/{templates → fixtures}/mercury/select.html +0 -0
- data/spec/javascripts/{templates → fixtures}/mercury/snippet.html +0 -0
- data/spec/javascripts/{templates → fixtures}/mercury/snippet_toolbar.html +0 -0
- data/spec/javascripts/{templates → fixtures}/mercury/statusbar.html +0 -0
- data/spec/javascripts/{templates → fixtures}/mercury/table_editor.html +0 -0
- data/spec/javascripts/{templates → fixtures}/mercury/toolbar.button.html +0 -0
- data/spec/javascripts/{templates → fixtures}/mercury/toolbar.button_group.html +0 -0
- data/spec/javascripts/{templates → fixtures}/mercury/toolbar.expander.html +0 -0
- data/spec/javascripts/{templates → fixtures}/mercury/toolbar.html +0 -0
- data/spec/javascripts/{templates → fixtures}/mercury/tooltip.html +0 -0
- data/spec/javascripts/{templates → fixtures}/mercury/uploader.html +0 -0
- data/spec/javascripts/mercury/{dialog_spec.js.coffee → dialog_spec.coffee} +11 -12
- data/spec/javascripts/mercury/dialogs/backcolor_spec.js.coffee +2 -3
- data/spec/javascripts/mercury/dialogs/forecolor_spec.js.coffee +3 -4
- data/spec/javascripts/mercury/dialogs/formatblock_spec.js.coffee +2 -3
- data/spec/javascripts/mercury/dialogs/snippetpanel_spec.js.coffee +2 -3
- data/spec/javascripts/mercury/dialogs/style_spec.js.coffee +2 -3
- data/spec/javascripts/mercury/lightview_spec.js.coffee +180 -142
- data/spec/javascripts/mercury/mercury_spec.js.coffee +19 -13
- data/spec/javascripts/mercury/modal_spec.js.coffee +192 -148
- data/spec/javascripts/mercury/modals/htmleditor_spec.js.coffee +4 -5
- data/spec/javascripts/mercury/modals/insertcharacter_spec.js.coffee +2 -3
- data/spec/javascripts/mercury/modals/insertlink_spec.js.coffee +107 -34
- data/spec/javascripts/mercury/modals/insertmedia_spec.js.coffee +106 -26
- data/spec/javascripts/mercury/modals/insertsnippet_spec.js.coffee +2 -3
- data/spec/javascripts/mercury/modals/inserttable_spec.js.coffee +50 -40
- data/spec/javascripts/mercury/page_editor_spec.js.coffee +124 -80
- data/spec/javascripts/mercury/palette_spec.js.coffee +4 -5
- data/spec/javascripts/mercury/panel_spec.js.coffee +9 -12
- data/spec/javascripts/mercury/region_spec.js.coffee +22 -17
- data/spec/javascripts/mercury/regions/{editable_spec.js.coffee → full_spec.js.coffee} +26 -28
- data/spec/javascripts/mercury/regions/image_spec.js.coffee +33 -0
- data/spec/javascripts/mercury/regions/{markupable_spec.js.coffee → markdown_spec.js.coffee} +32 -34
- data/spec/javascripts/mercury/regions/simple_spec.js.coffee +32 -0
- data/spec/javascripts/mercury/regions/{snippetable_spec.js.coffee → snippets_spec.js.coffee} +54 -55
- data/spec/javascripts/mercury/select_spec.js.coffee +4 -5
- data/spec/javascripts/mercury/snippet_spec.js.coffee +92 -16
- data/spec/javascripts/mercury/snippet_toolbar_spec.js.coffee +31 -16
- data/spec/javascripts/mercury/statusbar_spec.js.coffee +9 -10
- data/spec/javascripts/mercury/table_editor_spec.js.coffee +1 -2
- data/spec/javascripts/mercury/toolbar.button_group_spec.js.coffee +7 -9
- data/spec/javascripts/mercury/toolbar.button_spec.js.coffee +55 -26
- data/spec/javascripts/mercury/toolbar.expander_spec.js.coffee +13 -13
- data/spec/javascripts/mercury/toolbar_spec.js.coffee +43 -14
- data/spec/javascripts/mercury/tooltip_spec.js.coffee +1 -2
- data/spec/javascripts/mercury/uploader_spec.js.coffee +47 -33
- data/spec/javascripts/spec_helper.coffee +4 -0
- data/spec/javascripts/{spec_helper.js → support/event_simulation.js} +0 -2
- data/spec/teabag_env.rb +32 -0
- metadata +366 -196
- data/features/regions/editable/basic_editing.feature +0 -195
- data/features/regions/editable/inserting_tables.feature +0 -109
- data/spec/javascripts/templates/mercury/modals/insertlink.html +0 -30
- data/spec/javascripts/templates/mercury/modals/insertmedia.html +0 -35
- data/spec/javascripts/templates/mercury/modals/inserttable.html +0 -27
- data/spec/javascripts/templates/mercury/region.html +0 -2
- data/spec/javascripts/templates/mercury/regions/editable.html +0 -3
- data/spec/javascripts/templates/mercury/regions/snippetable.html +0 -4
- data/vendor/assets/javascripts/mercury/modals/inserttable.js.coffee +0 -54
- data/vendor/assets/javascripts/mercury_loader.js +0 -193
- data/vendor/assets/javascripts/mercury_overrides.js +0 -6
- data/vendor/assets/stylesheets/mercury/mercury.css +0 -151
- data/vendor/assets/stylesheets/mercury_overrides.css +0 -17
@@ -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
|
15
|
+
Given the content of the full 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
|
24
|
+
Then the contents of the full 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,30 +30,48 @@ 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
|
33
|
+
Then the contents of the full 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
|
37
|
+
Given the content of the full 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
|
44
|
+
Then the contents of the full 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
|
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
|
+
|
51
69
|
|
52
70
|
|
53
71
|
Scenario: A user can edit an image by double clicking it
|
54
|
-
Given the content of the
|
72
|
+
Given the content of the full region has an image
|
55
73
|
|
56
|
-
When I double click on the first image in the
|
74
|
+
When I double click on the first image in the full region
|
57
75
|
Then the modal window should be visible
|
58
76
|
And I should see "Insert Media (images and videos)" within the modal title
|
59
77
|
And the "media_image_url" field should contain "/assets/mercury/temp-logo.png"
|
@@ -61,34 +79,34 @@ Feature:
|
|
61
79
|
When I fill in "URL" with "/assets/mercury/default-snippet.png"
|
62
80
|
And select "Absolute Middle" from "Alignment"
|
63
81
|
And press "Insert Media"
|
64
|
-
Then the contents of the
|
82
|
+
Then the contents of the full region should be "this is <img src='/assets/mercury/default-snippet.png' align='absmiddle'> <b>content</b>"
|
65
83
|
|
66
84
|
|
67
85
|
Scenario: A user can embed and edit a youtube video
|
68
|
-
Given the content of the
|
86
|
+
Given the content of the full region is simple content
|
69
87
|
And I make a selection
|
70
88
|
|
71
89
|
When I click on the "Insert Media" button
|
72
|
-
And choose "YouTube
|
73
|
-
And fill in "YouTube
|
90
|
+
And choose "YouTube URL"
|
91
|
+
And fill in "YouTube URL" with "http://youtu.be/Pny4hoN8eII"
|
74
92
|
And fill in "Width" with "400"
|
75
93
|
And fill in "Height" with "200"
|
76
94
|
And press "Insert Media"
|
77
|
-
Then the contents of the
|
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>"
|
78
96
|
|
79
97
|
When I make a selection for "iframe"
|
80
98
|
And click on the "Insert Media" button
|
81
99
|
Then the "media_youtube_url" field should contain "http://youtu.be/Pny4hoN8eII"
|
82
100
|
|
83
|
-
When I fill in "YouTube
|
101
|
+
When I fill in "YouTube URL" with "http://youtu.be/Pny4hoN8eI"
|
84
102
|
And fill in "Width" with "500"
|
85
103
|
And fill in "Height" with "300"
|
86
104
|
And press "Insert Media"
|
87
|
-
Then the contents of the
|
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>"
|
88
106
|
|
89
107
|
|
90
108
|
# Scenario: A user can embed and edit a vimeo video
|
91
|
-
Given the content of the
|
109
|
+
Given the content of the full region is simple content
|
92
110
|
And I make a selection
|
93
111
|
|
94
112
|
When I click on the "Insert Media" button
|
@@ -97,7 +115,7 @@ Feature:
|
|
97
115
|
And fill in "Width" with "400"
|
98
116
|
And fill in "Height" with "200"
|
99
117
|
And press "Insert Media"
|
100
|
-
Then the contents of the
|
118
|
+
Then the contents of the full region should be "this is <iframe src='http://player.vimeo.com/video/25708134?title=1&byline=1&portrait=0&color=ffffff' style='width: 400px; height: 200px;' frameborder='0'></iframe> <b>content</b>"
|
101
119
|
|
102
120
|
When I make a selection for "iframe"
|
103
121
|
And click on the "Insert Media" button
|
@@ -107,4 +125,4 @@ Feature:
|
|
107
125
|
And fill in "Width" with "500"
|
108
126
|
And fill in "Height" with "300"
|
109
127
|
And press "Insert Media"
|
110
|
-
Then the contents of the
|
128
|
+
Then the contents of the full region should be "this is <iframe src='http://player.vimeo.com/video/2570813?title=1&byline=1&portrait=0&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
|
16
|
-
Given the content of the
|
15
|
+
Scenario: A user can drag and drop snippets into a full region
|
16
|
+
Given the content of the full 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
|
20
|
+
And I drag the example snippet into the full 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,23 +25,34 @@ 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
|
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>"
|
29
40
|
|
30
41
|
|
31
42
|
Scenario: A user can use the snippet toolbar to remove a snippet
|
32
43
|
Given the options for the example snippet "snippet_42" are first_name: "Jeremy", favorite_beer: "Stella"
|
33
|
-
And the content of the
|
44
|
+
And the content of the full region has that snippet
|
34
45
|
|
35
46
|
When I hover over the snippet
|
36
47
|
Then the snippet toolbar should be visible
|
37
48
|
|
38
49
|
When I click on the remove snippet toolbar button
|
39
|
-
Then the contents of the
|
50
|
+
Then the contents of the full region should be " <b>content</b>"
|
40
51
|
|
41
52
|
|
42
53
|
Scenario: A user can use the snippet toolbar to edit the options of a snippet
|
43
54
|
Given the options for the example snippet "snippet_42" are first_name: "Hipsters", favorite_beer: "PBR"
|
44
|
-
And the content of the
|
55
|
+
And the content of the full region has that snippet
|
45
56
|
|
46
57
|
When I hover over the snippet
|
47
58
|
And click on the edit snippet settings toolbar button
|
@@ -52,18 +63,18 @@ Feature:
|
|
52
63
|
When I fill in "First Name" with "Jeremy"
|
53
64
|
And fill in "Favorite Beer" with "Stella"
|
54
65
|
And press "Insert Snippet"
|
55
|
-
Then the contents of the
|
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>"
|
56
67
|
|
57
68
|
|
58
69
|
Scenario: A user can make changes to a snippets options, and they'll be versioned for undo and redo
|
59
70
|
Given the options for the example snippet "snippet_42" are first_name: "Hipsters", favorite_beer: "PBR"
|
60
|
-
And the content of the
|
71
|
+
And the content of the full region has that snippet
|
61
72
|
|
62
73
|
When I edit the snippet
|
63
74
|
And I fill in "First Name" with "Jeremy"
|
64
75
|
And fill in "Favorite Beer" with "Stella"
|
65
76
|
And press "Insert Snippet"
|
66
|
-
Then the contents of the
|
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>"
|
67
78
|
|
68
79
|
When I edit the snippet
|
69
80
|
Then the "First Name" field should contain "Jeremy"
|
@@ -72,19 +83,18 @@ Feature:
|
|
72
83
|
When fill in "First Name" with "Diesel"
|
73
84
|
And fill in "Favorite Beer" with "Bells Hopslam"
|
74
85
|
And press "Insert Snippet"
|
75
|
-
Then the content of the
|
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>"
|
76
87
|
|
77
88
|
When I click on the "Undo" button
|
78
|
-
Then the contents of the
|
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>"
|
79
90
|
|
80
91
|
When I edit the snippet
|
81
|
-
|
82
|
-
|
83
|
-
# And the "Favorite Beer" field should contain "Stella"
|
92
|
+
Then the "First Name" field should contain "Jeremy"
|
93
|
+
And the "Favorite Beer" field should contain "Stella"
|
84
94
|
|
85
95
|
When I close the modal
|
86
96
|
When I click on the "Redo" button
|
87
|
-
Then the contents of the
|
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>"
|
88
98
|
|
89
99
|
When I edit the snippet
|
90
100
|
Then the "First Name" field should contain "Diesel"
|
@@ -93,10 +103,10 @@ Feature:
|
|
93
103
|
When I fill in "First Name" with "Jen"
|
94
104
|
And fill in "Favorite Beer" with "Miller High Life"
|
95
105
|
And press "Insert Snippet"
|
96
|
-
Then the contents of the
|
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>"
|
97
107
|
|
98
108
|
|
99
109
|
# Scenario: When a user saves, the snippets should be gone from the html, but the options are serialized
|
100
110
|
# Given the options for the example snippet "snippet_42" are first_name: "Hipsters", favorite_beer: "PBR"
|
101
|
-
# And the content of the
|
111
|
+
# And the content of the full region has that snippet
|
102
112
|
# 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
|
15
|
+
Given the content of the full 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
|
24
|
+
And the contents of the full region should be "this is ☃ <b>content</b>"
|
@@ -0,0 +1,109 @@
|
|
1
|
+
@javascript
|
2
|
+
Feature:
|
3
|
+
As a content editor type person
|
4
|
+
In order to manage content
|
5
|
+
I should be able to insert and edit complex tables
|
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 insert a table
|
15
|
+
Given the content of the full region is simple content
|
16
|
+
And I make a selection
|
17
|
+
|
18
|
+
When I click on the "Insert Table" button
|
19
|
+
Then the modal window should be visible
|
20
|
+
And I should see "Insert Table" within the modal title
|
21
|
+
|
22
|
+
When I click on the third cell in the first row
|
23
|
+
And I add a column before it
|
24
|
+
Then the table column count should be 4
|
25
|
+
And the selected cell should be the forth cell in the first row
|
26
|
+
|
27
|
+
When I add a column after
|
28
|
+
Then the table column count should be 5
|
29
|
+
And the selected cell should be the forth cell in the first row
|
30
|
+
|
31
|
+
When I add a row after
|
32
|
+
Then the table row count should be 3
|
33
|
+
And the selected cell should be the forth cell in the first row
|
34
|
+
|
35
|
+
When I add a row before
|
36
|
+
Then the table row count should be 4
|
37
|
+
And the selected cell should be the forth cell in the second row
|
38
|
+
|
39
|
+
When I delete the column
|
40
|
+
Then the table column count should be 4
|
41
|
+
And a selected cell should not be visible
|
42
|
+
|
43
|
+
When I click on the second cell in the second row
|
44
|
+
And delete the row
|
45
|
+
Then the table row count should be 3
|
46
|
+
And a selected cell should not be visible
|
47
|
+
|
48
|
+
When I click on the second cell in the second row
|
49
|
+
And increase the colspan
|
50
|
+
And click on the first cell in the first row
|
51
|
+
And increase the rowspan
|
52
|
+
And select "Right" from "Alignment"
|
53
|
+
And fill in "Border" with "2"
|
54
|
+
And fill in "Spacing" with "2"
|
55
|
+
And press "Insert Table"
|
56
|
+
Then the contents of the full region should be "this is <table align='right' border='2' cellspacing='2'><tbody><tr><td rowspan='2'><br></td><td><br></td><td><br></td><td><br></td></tr><tr><td colspan='2'><br></td><td><br></td></tr><tr><td><br></td><td><br></td><td><br></td><td><br></td></tr></tbody></table> <b>content</b>"
|
57
|
+
And the modal window should not be visible
|
58
|
+
|
59
|
+
|
60
|
+
# Scenario: A user can edit a table after inserting one (in a full region)
|
61
|
+
Given the content of the full region has a table
|
62
|
+
And I make a selection
|
63
|
+
|
64
|
+
When I click on the add row before editor button
|
65
|
+
Then the table row count should be 3
|
66
|
+
And the contents of the full region should be "this is a <table><tbody><tr><td><br></td><td><br></td></tr><tr><td><span>1</span></td><td><span>2</span></td></tr><tr><td><span>3</span></td><td><span>4</span></td></tr></tbody></table> <b>content</b>"
|
67
|
+
|
68
|
+
When I click on the add row after editor button
|
69
|
+
Then the table row count should be 4
|
70
|
+
And the contents of the full region should be "this is a <table><tbody><tr><td><br></td><td><br></td></tr><tr><td><span>1</span></td><td><span>2</span></td></tr><tr><td><br></td><td><br></td></tr><tr><td><span>3</span></td><td><span>4</span></td></tr></tbody></table> <b>content</b>"
|
71
|
+
|
72
|
+
When I click on the add column before editor button
|
73
|
+
Then the column count should be 3
|
74
|
+
And the contents of the full region should be "this is a <table><tbody><tr><td><br></td><td><br></td><td><br></td></tr><tr><td><br></td><td><span>1</span></td><td><span>2</span></td></tr><tr><td><br></td><td><br></td><td><br></td></tr><tr><td><br></td><td><span>3</span></td><td><span>4</span></td></tr></tbody></table> <b>content</b>"
|
75
|
+
|
76
|
+
When I click on the add column after editor button
|
77
|
+
Then the column count should be 4
|
78
|
+
And the contents of the full region should be "this is a <table><tbody><tr><td><br></td><td><br></td><td><br></td><td><br></td></tr><tr><td><br></td><td><span>1</span></td><td><br></td><td><span>2</span></td></tr><tr><td><br></td><td><br></td><td><br></td><td><br></td></tr><tr><td><br></td><td><span>3</span></td><td><br></td><td><span>4</span></td></tr></tbody></table> <b>content</b>"
|
79
|
+
|
80
|
+
When I click on the delete row editor button
|
81
|
+
Then the table row count should be 3
|
82
|
+
And the contents of the full region should be "this is a <table><tbody><tr><td><br></td><td><br></td><td><br></td><td><br></td></tr><tr><td><br></td><td><br></td><td><br></td><td><br></td></tr><tr><td><br></td><td><span>3</span></td><td><br></td><td><span>4</span></td></tr></tbody></table> <b>content</b>"
|
83
|
+
|
84
|
+
When I make a selection
|
85
|
+
And click on the delete column editor button
|
86
|
+
Then the table column count should be 3
|
87
|
+
And the contents of the full region should be "this is a <table><tbody><tr><td><br></td><td><br></td><td><br></td></tr><tr><td><br></td><td><br></td><td><br></td></tr><tr><td><br></td><td><br></td><td><span>4</span></td></tr></tbody></table> <b>content</b>"
|
88
|
+
|
89
|
+
|
90
|
+
# Scenario: A user can adjust the colspans of a table (in a full region)
|
91
|
+
Given the content of the full region has a table
|
92
|
+
And I make a selection
|
93
|
+
|
94
|
+
When I click on the increase colspan editor button
|
95
|
+
Then the contents of the full region should be "this is a <table><tbody><tr><td colspan='2'><span>1</span></td></tr><tr><td><span>3</span></td><td><span>4</span></td></tr></tbody></table> <b>content</b>"
|
96
|
+
|
97
|
+
When I click on the decrease colspan editor button
|
98
|
+
Then the contents of the full region should be "this is a <table><tbody><tr><td><span>1</span></td><td><br></td></tr><tr><td><span>3</span></td><td><span>4</span></td></tr></tbody></table> <b>content</b>"
|
99
|
+
|
100
|
+
|
101
|
+
# Scenario: A user can adjust the rowspans of a table (in a full region)
|
102
|
+
Given the content of the full region has a table
|
103
|
+
And I make a selection
|
104
|
+
|
105
|
+
When I click on the increase rowspan editor button
|
106
|
+
Then the contents of the full region should be "this is a <table><tbody><tr><td rowspan='2'><span>1</span></td><td><span>2</span></td></tr><tr><td><span>4</span></td></tr></tbody></table> <b>content</b>"
|
107
|
+
|
108
|
+
When I click on the decrease rowspan editor button
|
109
|
+
Then the contents of the full region should be "this is a <table><tbody><tr><td><span>1</span></td><td><span>2</span></td></tr><tr><td><br></td><td><span>4</span></td></tr></tbody></table> <b>content</b>"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/features/regions/{snippetable/advanced_editing.feature → markdown/uploading_images.feature}
RENAMED
File without changes
|
data/features/regions/{snippetable/basic_editing.feature → snippets/advanced_editing.feature}
RENAMED
File without changes
|
data/features/regions/{snippetable/inserting_snippets.feature → snippets/basic_editing.feature}
RENAMED
File without changes
|
File without changes
|
@@ -9,19 +9,19 @@ Feature:
|
|
9
9
|
And save results will be cached
|
10
10
|
|
11
11
|
|
12
|
-
Scenario: A user can change content in
|
13
|
-
When I set the content of the
|
12
|
+
Scenario: A user can change content in a full region and save those changes
|
13
|
+
When I set the content of the full region to "new content"
|
14
14
|
And I click on the "Save" button
|
15
|
-
Then the save should have "new content" for the
|
15
|
+
Then the save should have "new content" for the full region
|
16
16
|
|
17
17
|
|
18
|
-
Scenario: A user can change content in a
|
19
|
-
When I set the content of the
|
18
|
+
Scenario: A user can change content in a markdown region and save those changes
|
19
|
+
When I set the content of the markdown region to "new content"
|
20
20
|
And I click on the "Save" button
|
21
|
-
Then the save should have "new content" for the
|
21
|
+
Then the save should have "new content" for the markdown region
|
22
22
|
|
23
23
|
|
24
|
-
Scenario: A user can put snippets into
|
24
|
+
Scenario: A user can put snippets into a full region and get the options on save
|
25
25
|
# todo: finish
|
26
26
|
|
27
27
|
|
@@ -29,5 +29,5 @@ Feature:
|
|
29
29
|
# todo: finish
|
30
30
|
|
31
31
|
|
32
|
-
Scenario: A user can put snippets into a
|
32
|
+
Scenario: A user can put snippets into a markdown region and get the options on save
|
33
33
|
# todo: finish
|
@@ -0,0 +1,22 @@
|
|
1
|
+
## Generic web steps
|
2
|
+
#------------------------------------------------------------------------------
|
3
|
+
When /^(?:|I )click on (.+)$/ do |locator|
|
4
|
+
selector = selector_for(locator)
|
5
|
+
find(selector, :message => "Unable to locate the element '#{selector}' to click on").click
|
6
|
+
end
|
7
|
+
|
8
|
+
Then /^(.+) should (not )?be visible$/ do |locator, boolean|
|
9
|
+
selector = selector_for(locator)
|
10
|
+
if boolean == 'not '
|
11
|
+
page.has_no_css?("#{selector}")
|
12
|
+
else
|
13
|
+
page.has_css?("#{selector}", :visible => true)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
# scoping step for different windows
|
18
|
+
When /^(.*) in the "([^"]*)" window$/ do |s, window|
|
19
|
+
page.driver.within_window(window) do
|
20
|
+
step(s)
|
21
|
+
end
|
22
|
+
end
|