kiteditor 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +25 -0
- data/app/controllers/mercury/images_controller.rb +5 -0
- data/app/controllers/mercury_controller.rb +34 -0
- data/app/models/mercury/image.rb +17 -0
- data/app/views/layouts/mercury.html.erb +33 -0
- data/app/views/layouts/popup.html.haml +9 -0
- data/app/views/mercury/images/_list.html.haml +22 -0
- data/app/views/mercury/images/index.html.haml +4 -0
- data/app/views/mercury/images/index.js.erb +2 -0
- data/app/views/mercury/lightviews/about.html +11 -0
- data/app/views/mercury/modals/character.html +255 -0
- data/app/views/mercury/modals/htmleditor.html +13 -0
- data/app/views/mercury/modals/link.html +94 -0
- data/app/views/mercury/modals/media.html +1 -0
- data/app/views/mercury/modals/table.html +84 -0
- data/app/views/mercury/palettes/backcolor.html +73 -0
- data/app/views/mercury/palettes/forecolor.html +73 -0
- data/app/views/mercury/panels/history.html +3 -0
- data/app/views/mercury/panels/notes.html +3 -0
- data/app/views/mercury/panels/snippets.html +12 -0
- data/app/views/mercury/selects/formatblock.html +11 -0
- data/app/views/mercury/selects/style.html +5 -0
- data/app/views/mercury/snippets/example/options.html.erb +34 -0
- data/app/views/mercury/snippets/example/preview.html.erb +1 -0
- data/config/engine.rb +44 -0
- data/db/migrate/20110526035601_create_mercury_images.rb +11 -0
- data/features/loading/loading.feature +22 -0
- data/features/loading/navigating.feature +77 -0
- data/features/loading/user_interface.feature +67 -0
- data/features/regions/editable/advanced_editing.feature +0 -0
- data/features/regions/editable/basic_editing.feature +195 -0
- data/features/regions/editable/inserting_links.feature +98 -0
- data/features/regions/editable/inserting_media.feature +110 -0
- data/features/regions/editable/inserting_snippets.feature +102 -0
- data/features/regions/editable/inserting_special_characters.feature +24 -0
- data/features/regions/editable/inserting_tables.feature +109 -0
- data/features/regions/editable/pasting.feature +0 -0
- data/features/regions/editable/uploading_images.feature +0 -0
- data/features/regions/markupable/advanced_editing.feature +0 -0
- data/features/regions/markupable/basic_editing.feature +0 -0
- data/features/regions/markupable/inserting_links.feature +0 -0
- data/features/regions/markupable/inserting_media.feature +0 -0
- data/features/regions/markupable/inserting_snippets.feature +0 -0
- data/features/regions/markupable/inserting_special_characters.feature +0 -0
- data/features/regions/markupable/inserting_tables.feature +0 -0
- data/features/regions/markupable/uploading_images.feature +0 -0
- data/features/regions/snippetable/advanced_editing.feature +0 -0
- data/features/regions/snippetable/basic_editing.feature +0 -0
- data/features/regions/snippetable/inserting_snippets.feature +0 -0
- data/features/saving/saving.feature +33 -0
- data/features/step_definitions/debug_steps.rb +14 -0
- data/features/step_definitions/mercury_steps.rb +438 -0
- data/features/step_definitions/web_steps.rb +211 -0
- data/features/support/env.rb +46 -0
- data/features/support/mercury_contents.rb +25 -0
- data/features/support/mercury_selectors.rb +148 -0
- data/features/support/paths.rb +38 -0
- data/features/support/selectors.rb +44 -0
- data/lib/generators/mercury/install/install_generator.rb +49 -0
- data/lib/generators/mercury/install/templates/mongoid_paperclip_image.rb +17 -0
- data/lib/mercury/authentication.rb +8 -0
- data/lib/mercury-rails.rb +3 -0
- data/spec/javascripts/mercury/dialog_spec.js.coffee +281 -0
- data/spec/javascripts/mercury/dialogs/backcolor_spec.js.coffee +37 -0
- data/spec/javascripts/mercury/dialogs/forecolor_spec.js.coffee +37 -0
- data/spec/javascripts/mercury/dialogs/formatblock_spec.js.coffee +25 -0
- data/spec/javascripts/mercury/dialogs/snippetpanel_spec.js.coffee +30 -0
- data/spec/javascripts/mercury/dialogs/style_spec.js.coffee +25 -0
- data/spec/javascripts/mercury/history_buffer_spec.js.coffee +76 -0
- data/spec/javascripts/mercury/lightview_spec.js.coffee +497 -0
- data/spec/javascripts/mercury/mercury_spec.js.coffee +132 -0
- data/spec/javascripts/mercury/modal_spec.js.coffee +504 -0
- data/spec/javascripts/mercury/modals/htmleditor_spec.js.coffee +30 -0
- data/spec/javascripts/mercury/modals/insertcharacter_spec.js.coffee +29 -0
- data/spec/javascripts/mercury/modals/insertlink_spec.js.coffee +220 -0
- data/spec/javascripts/mercury/modals/insertmedia_spec.js.coffee +167 -0
- data/spec/javascripts/mercury/modals/insertsnippet_spec.js.coffee +52 -0
- data/spec/javascripts/mercury/modals/inserttable_spec.js.coffee +160 -0
- data/spec/javascripts/mercury/native_extensions_spec.js.coffee +60 -0
- data/spec/javascripts/mercury/page_editor_spec.js.coffee +750 -0
- data/spec/javascripts/mercury/palette_spec.js.coffee +49 -0
- data/spec/javascripts/mercury/panel_spec.js.coffee +185 -0
- data/spec/javascripts/mercury/region_spec.js.coffee +298 -0
- data/spec/javascripts/mercury/regions/editable_spec.js.coffee +561 -0
- data/spec/javascripts/mercury/regions/markupable_spec.js.coffee +367 -0
- data/spec/javascripts/mercury/regions/snippetable_spec.js.coffee +370 -0
- data/spec/javascripts/mercury/select_spec.js.coffee +49 -0
- data/spec/javascripts/mercury/snippet_spec.js.coffee +245 -0
- data/spec/javascripts/mercury/snippet_toolbar_spec.js.coffee +184 -0
- data/spec/javascripts/mercury/statusbar_spec.js.coffee +150 -0
- data/spec/javascripts/mercury/table_editor_spec.js.coffee +194 -0
- data/spec/javascripts/mercury/toolbar.button_group_spec.js.coffee +90 -0
- data/spec/javascripts/mercury/toolbar.button_spec.js.coffee +360 -0
- data/spec/javascripts/mercury/toolbar.expander_spec.js.coffee +118 -0
- data/spec/javascripts/mercury/toolbar_spec.js.coffee +222 -0
- data/spec/javascripts/mercury/tooltip_spec.js.coffee +186 -0
- data/spec/javascripts/mercury/uploader_spec.js.coffee +514 -0
- data/spec/javascripts/spec_helper.js +513 -0
- data/spec/javascripts/templates/mercury/dialog.html +2 -0
- data/spec/javascripts/templates/mercury/dialogs/backcolor.html +5 -0
- data/spec/javascripts/templates/mercury/dialogs/forecolor.html +5 -0
- data/spec/javascripts/templates/mercury/dialogs/formatblock.html +3 -0
- data/spec/javascripts/templates/mercury/dialogs/snippetpanel.html +16 -0
- data/spec/javascripts/templates/mercury/dialogs/style.html +3 -0
- data/spec/javascripts/templates/mercury/lightview.html +13 -0
- data/spec/javascripts/templates/mercury/modal.html +13 -0
- data/spec/javascripts/templates/mercury/modals/htmleditor.html +5 -0
- data/spec/javascripts/templates/mercury/modals/insertcharacter.html +5 -0
- data/spec/javascripts/templates/mercury/modals/insertlink.html +30 -0
- data/spec/javascripts/templates/mercury/modals/insertmedia.html +35 -0
- data/spec/javascripts/templates/mercury/modals/insertsnippet.html +6 -0
- data/spec/javascripts/templates/mercury/modals/inserttable.html +27 -0
- data/spec/javascripts/templates/mercury/page_editor.html +35 -0
- data/spec/javascripts/templates/mercury/palette.html +16 -0
- data/spec/javascripts/templates/mercury/panel.html +16 -0
- data/spec/javascripts/templates/mercury/region.html +2 -0
- data/spec/javascripts/templates/mercury/regions/editable.html +3 -0
- data/spec/javascripts/templates/mercury/regions/snippetable.html +4 -0
- data/spec/javascripts/templates/mercury/select.html +16 -0
- data/spec/javascripts/templates/mercury/snippet.html +1 -0
- data/spec/javascripts/templates/mercury/snippet_toolbar.html +16 -0
- data/spec/javascripts/templates/mercury/statusbar.html +8 -0
- data/spec/javascripts/templates/mercury/table_editor.html +65 -0
- data/spec/javascripts/templates/mercury/toolbar.button.html +64 -0
- data/spec/javascripts/templates/mercury/toolbar.button_group.html +9 -0
- data/spec/javascripts/templates/mercury/toolbar.expander.html +18 -0
- data/spec/javascripts/templates/mercury/toolbar.html +11 -0
- data/spec/javascripts/templates/mercury/tooltip.html +12 -0
- data/spec/javascripts/templates/mercury/uploader.html +11 -0
- data/vendor/assets/images/mercury/button.png +0 -0
- data/vendor/assets/images/mercury/close.png +0 -0
- data/vendor/assets/images/mercury/default-snippet.png +0 -0
- data/vendor/assets/images/mercury/loading-dark.gif +0 -0
- data/vendor/assets/images/mercury/loading-light.gif +0 -0
- data/vendor/assets/images/mercury/missing-image.png +0 -0
- data/vendor/assets/images/mercury/search-icon.png +0 -0
- data/vendor/assets/images/mercury/temp-logo.png +0 -0
- data/vendor/assets/images/mercury/toolbar/editable/buttons.png +0 -0
- data/vendor/assets/images/mercury/toolbar/primary/_expander.png +0 -0
- data/vendor/assets/images/mercury/toolbar/primary/_pressed.png +0 -0
- data/vendor/assets/images/mercury/toolbar/primary/historypanel.png +0 -0
- data/vendor/assets/images/mercury/toolbar/primary/insertcharacter.png +0 -0
- data/vendor/assets/images/mercury/toolbar/primary/insertlink.png +0 -0
- data/vendor/assets/images/mercury/toolbar/primary/insertmedia.png +0 -0
- data/vendor/assets/images/mercury/toolbar/primary/inserttable.png +0 -0
- data/vendor/assets/images/mercury/toolbar/primary/inspectorpanel.png +0 -0
- data/vendor/assets/images/mercury/toolbar/primary/notespanel.png +0 -0
- data/vendor/assets/images/mercury/toolbar/primary/preview.png +0 -0
- data/vendor/assets/images/mercury/toolbar/primary/redo.png +0 -0
- data/vendor/assets/images/mercury/toolbar/primary/save.png +0 -0
- data/vendor/assets/images/mercury/toolbar/primary/snippetpanel.png +0 -0
- data/vendor/assets/images/mercury/toolbar/primary/undo.png +0 -0
- data/vendor/assets/images/mercury/toolbar/snippetable/buttons.png +0 -0
- data/vendor/assets/javascripts/mercury/dependencies/jquery-1.7.js +9300 -0
- data/vendor/assets/javascripts/mercury/dependencies/jquery-ui-1.8.13.custom.js +1328 -0
- data/vendor/assets/javascripts/mercury/dependencies/jquery-ui-1.8.18.custom.min.js +356 -0
- data/vendor/assets/javascripts/mercury/dependencies/jquery-ui.1.8.13.custom.min.js +356 -0
- data/vendor/assets/javascripts/mercury/dependencies/jquery.additions.js +206 -0
- data/vendor/assets/javascripts/mercury/dependencies/jquery.htmlClean.js +527 -0
- data/vendor/assets/javascripts/mercury/dependencies/liquidmetal.js +88 -0
- data/vendor/assets/javascripts/mercury/dependencies/showdown.js +1340 -0
- data/vendor/assets/javascripts/mercury/dialog.js.coffee +159 -0
- data/vendor/assets/javascripts/mercury/dialogs/backcolor.js.coffee +6 -0
- data/vendor/assets/javascripts/mercury/dialogs/forecolor.js.coffee +6 -0
- data/vendor/assets/javascripts/mercury/dialogs/formatblock.js.coffee +4 -0
- data/vendor/assets/javascripts/mercury/dialogs/snippetpanel.js.coffee +10 -0
- data/vendor/assets/javascripts/mercury/dialogs/style.js.coffee +4 -0
- data/vendor/assets/javascripts/mercury/finalize.js.coffee +3 -0
- data/vendor/assets/javascripts/mercury/history_buffer.js.coffee +30 -0
- data/vendor/assets/javascripts/mercury/lightview.js.coffee +205 -0
- data/vendor/assets/javascripts/mercury/locales/da.locale.js.coffee +0 -0
- data/vendor/assets/javascripts/mercury/locales/de.locale.js.coffee +206 -0
- data/vendor/assets/javascripts/mercury/locales/es.locale.js.coffee +211 -0
- data/vendor/assets/javascripts/mercury/locales/example.local.js.coffee +211 -0
- data/vendor/assets/javascripts/mercury/locales/fr.locale.js.coffee +211 -0
- data/vendor/assets/javascripts/mercury/locales/it.locale.js.coffee +208 -0
- data/vendor/assets/javascripts/mercury/locales/ko.local.js.coffee +206 -0
- data/vendor/assets/javascripts/mercury/locales/nl.locale.js.coffee +206 -0
- data/vendor/assets/javascripts/mercury/locales/pt.locale.js.coffee +211 -0
- data/vendor/assets/javascripts/mercury/locales/sv.local.js.coffee +209 -0
- data/vendor/assets/javascripts/mercury/locales/swedish_chef.locale.js.coffee +213 -0
- data/vendor/assets/javascripts/mercury/mercury.js.coffee +109 -0
- data/vendor/assets/javascripts/mercury/modal.js.coffee +204 -0
- data/vendor/assets/javascripts/mercury/modals/htmleditor.js.coffee +11 -0
- data/vendor/assets/javascripts/mercury/modals/insertcharacter.js.coffee +4 -0
- data/vendor/assets/javascripts/mercury/modals/insertlink.js.coffee +95 -0
- data/vendor/assets/javascripts/mercury/modals/insertmedia.js.coffee +107 -0
- data/vendor/assets/javascripts/mercury/modals/insertsnippet.js.coffee +12 -0
- data/vendor/assets/javascripts/mercury/modals/inserttable.js.coffee +54 -0
- data/vendor/assets/javascripts/mercury/native_extensions.js.coffee +55 -0
- data/vendor/assets/javascripts/mercury/page_editor.js.coffee +241 -0
- data/vendor/assets/javascripts/mercury/palette.js.coffee +29 -0
- data/vendor/assets/javascripts/mercury/panel.js.coffee +115 -0
- data/vendor/assets/javascripts/mercury/plugins/save_as_xml/mercury/page_editor.js.coffee +28 -0
- data/vendor/assets/javascripts/mercury/plugins/save_as_xml/plugin.js +9 -0
- data/vendor/assets/javascripts/mercury/region.js.coffee +107 -0
- data/vendor/assets/javascripts/mercury/regions/editable.js.coffee +600 -0
- data/vendor/assets/javascripts/mercury/regions/markupable.js.coffee +398 -0
- data/vendor/assets/javascripts/mercury/regions/simple.js.coffee +339 -0
- data/vendor/assets/javascripts/mercury/regions/snippetable.js.coffee +124 -0
- data/vendor/assets/javascripts/mercury/select.js.coffee +44 -0
- data/vendor/assets/javascripts/mercury/snippet.js.coffee +104 -0
- data/vendor/assets/javascripts/mercury/snippet_toolbar.js.coffee +72 -0
- data/vendor/assets/javascripts/mercury/statusbar.js.coffee +51 -0
- data/vendor/assets/javascripts/mercury/support/history.js +1 -0
- data/vendor/assets/javascripts/mercury/table_editor.js.coffee +265 -0
- data/vendor/assets/javascripts/mercury/toolbar.button.js.coffee +173 -0
- data/vendor/assets/javascripts/mercury/toolbar.button_group.js.coffee +42 -0
- data/vendor/assets/javascripts/mercury/toolbar.expander.js.coffee +56 -0
- data/vendor/assets/javascripts/mercury/toolbar.js.coffee +86 -0
- data/vendor/assets/javascripts/mercury/tooltip.js.coffee +74 -0
- data/vendor/assets/javascripts/mercury/uploader.js.coffee +227 -0
- data/vendor/assets/javascripts/mercury.js +479 -0
- data/vendor/assets/javascripts/mercury_loader.js +193 -0
- data/vendor/assets/javascripts/mercury_overrides.js +6 -0
- data/vendor/assets/javascripts/popup.js +8 -0
- data/vendor/assets/stylesheets/mercury/all_images.css.erb +89 -0
- data/vendor/assets/stylesheets/mercury/dialog.css +208 -0
- data/vendor/assets/stylesheets/mercury/lightview.css +151 -0
- data/vendor/assets/stylesheets/mercury/mercury.css +151 -0
- data/vendor/assets/stylesheets/mercury/modal.css +183 -0
- data/vendor/assets/stylesheets/mercury/statusbar.css +32 -0
- data/vendor/assets/stylesheets/mercury/toolbar.css +304 -0
- data/vendor/assets/stylesheets/mercury/tooltip.css +26 -0
- data/vendor/assets/stylesheets/mercury/uploader.css +111 -0
- data/vendor/assets/stylesheets/mercury.css +28 -0
- data/vendor/assets/stylesheets/mercury_overrides.css +17 -0
- data/vendor/assets/stylesheets/popup.css.erb +37 -0
- metadata +634 -0
@@ -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 <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 <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>"
|
@@ -0,0 +1,98 @@
|
|
1
|
+
@javascript
|
2
|
+
Feature:
|
3
|
+
As a content editor type person
|
4
|
+
In order to manage content
|
5
|
+
I should be able to insert links of different types
|
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 and edit a link to an external site
|
15
|
+
Given the content of the editable region is simple content
|
16
|
+
And I make a selection
|
17
|
+
|
18
|
+
When I click on the "Insert Link" button
|
19
|
+
Then the modal window should be visible
|
20
|
+
And the "Link Content" field should contain "simple"
|
21
|
+
|
22
|
+
When I fill in "URL" with "http://google.com"
|
23
|
+
And press "Insert Link"
|
24
|
+
Then the contents of the editable region should be "this is <a href='http://google.com'>simple</a> <b>content</b>"
|
25
|
+
And the modal window should not be visible
|
26
|
+
|
27
|
+
When I click on the "Insert Link" button
|
28
|
+
Then I should not see "Link Content"
|
29
|
+
|
30
|
+
When I fill in "URL" with "http://cnn.com"
|
31
|
+
And press "Insert Link"
|
32
|
+
Then the contents of the editable region should be "this is <a href='http://cnn.com'>simple</a> <b>content</b>"
|
33
|
+
|
34
|
+
|
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
|
+
And I make a selection
|
38
|
+
|
39
|
+
When I click on the "Insert Link" button
|
40
|
+
And fill in "URL" with "http://google.com"
|
41
|
+
And select "Blank (a new window or tab)" from "Link Target"
|
42
|
+
And press "Insert Link"
|
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
|
+
|
45
|
+
When I click on the "Insert Link" button
|
46
|
+
And select "Top (removes any frames)" from "Link Target"
|
47
|
+
And press "Insert Link"
|
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
|
+
|
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 editable region is simple content
|
53
|
+
And I make a selection
|
54
|
+
|
55
|
+
When I click on the "Insert Link" button
|
56
|
+
And fill in "URL" with "http://google.com"
|
57
|
+
And select "Popup Window (javascript new window popup)" from "Link Target"
|
58
|
+
And I fill in "Popup Width" with "500"
|
59
|
+
And fill in "Popup Height" with "200"
|
60
|
+
And press "Insert Link"
|
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
|
+
|
63
|
+
When I click on the "Insert Link" button
|
64
|
+
Then the "Popup Width" field should contain "500"
|
65
|
+
And the "Popup Height" field should contain "200"
|
66
|
+
|
67
|
+
|
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
|
+
And I make a selection
|
71
|
+
|
72
|
+
When I click on the "Insert Link" button
|
73
|
+
And I choose "Bookmark"
|
74
|
+
And fill in "Bookmark" with "test-bookmark1"
|
75
|
+
And press "Insert Link"
|
76
|
+
Then the contents of the editable region should be "this is <a name='test-bookmark1'>simple</a> <b>content</b>"
|
77
|
+
|
78
|
+
When I make a selection for "b"
|
79
|
+
And click on the "Insert Link" button
|
80
|
+
And I choose "Existing Links"
|
81
|
+
And select "simple" from "Existing Links"
|
82
|
+
And press "Insert Link"
|
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
|
+
|
85
|
+
When I make a selection for "a"
|
86
|
+
And click on the "Insert Link" button
|
87
|
+
# todo: this should prefill
|
88
|
+
#Then the "Bookmark" field should contain "test-bookmark1"
|
89
|
+
And I choose "Bookmark"
|
90
|
+
And fill in "Bookmark" with "test-bookmark2"
|
91
|
+
And press "Insert Link"
|
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
|
+
|
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
|
+
|
96
|
+
|
97
|
+
Scenario: A user can navigate links inside of regions
|
98
|
+
# todo: finish
|
@@ -0,0 +1,110 @@
|
|
1
|
+
@javascript
|
2
|
+
Feature:
|
3
|
+
As a content editor type person
|
4
|
+
In order to manage content
|
5
|
+
I should be able to insert different types of media
|
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 and edit an image
|
15
|
+
Given the content of the editable region is simple content
|
16
|
+
And I make a selection
|
17
|
+
|
18
|
+
When I click on the "Insert Media" button
|
19
|
+
Then the modal window should be visible
|
20
|
+
And I should see "Insert Media (images and videos)" within the modal title
|
21
|
+
|
22
|
+
When I fill in "URL" with "/assets/mercury/temp-logo.png"
|
23
|
+
And press "Insert Media"
|
24
|
+
Then the contents of the editable region should be "this is <img src='/assets/mercury/temp-logo.png'> <b>content</b>"
|
25
|
+
And the modal window should not be visible
|
26
|
+
|
27
|
+
When I make a selection for "img"
|
28
|
+
And click on the "Insert Media" button
|
29
|
+
Then the "media_image_url" field should contain "/assets/mercury/temp-logo.png"
|
30
|
+
|
31
|
+
When I fill in "URL" with "/assets/mercury/default-snippet.png"
|
32
|
+
And press "Insert Media"
|
33
|
+
Then the contents of the editable region should be "this is <img src='/assets/mercury/default-snippet.png'> <b>content</b>"
|
34
|
+
|
35
|
+
|
36
|
+
# Scenario: A user can insert and edit an image with an alignment set
|
37
|
+
Given the content of the editable region is simple content
|
38
|
+
And I make a selection
|
39
|
+
|
40
|
+
When I click on the "Insert Media" button
|
41
|
+
When I fill in "media_image_url" with "/assets/mercury/temp-logo.png"
|
42
|
+
And select "Right" from "Alignment"
|
43
|
+
And press "Insert Media"
|
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
|
+
|
46
|
+
When I make a selection for "img"
|
47
|
+
And click on the "Insert Media" button
|
48
|
+
And select "Absolute Middle" from "Alignment"
|
49
|
+
And press "Insert Media"
|
50
|
+
Then the contents of the editable region should be "this is <img src='/assets/mercury/temp-logo.png' align='absmiddle'> <b>content</b>"
|
51
|
+
|
52
|
+
|
53
|
+
Scenario: A user can edit an image by double clicking it
|
54
|
+
Given the content of the editable region has an image
|
55
|
+
|
56
|
+
When I double click on the first image in the editable region
|
57
|
+
Then the modal window should be visible
|
58
|
+
And I should see "Insert Media (images and videos)" within the modal title
|
59
|
+
And the "media_image_url" field should contain "/assets/mercury/temp-logo.png"
|
60
|
+
|
61
|
+
When I fill in "URL" with "/assets/mercury/default-snippet.png"
|
62
|
+
And select "Absolute Middle" from "Alignment"
|
63
|
+
And press "Insert Media"
|
64
|
+
Then the contents of the editable region should be "this is <img src='/assets/mercury/default-snippet.png' align='absmiddle'> <b>content</b>"
|
65
|
+
|
66
|
+
|
67
|
+
Scenario: A user can embed and edit a youtube video
|
68
|
+
Given the content of the editable region is simple content
|
69
|
+
And I make a selection
|
70
|
+
|
71
|
+
When I click on the "Insert Media" button
|
72
|
+
And choose "YouTube Share URL"
|
73
|
+
And fill in "YouTube Share URL" with "http://youtu.be/Pny4hoN8eII"
|
74
|
+
And fill in "Width" with "400"
|
75
|
+
And fill in "Height" with "200"
|
76
|
+
And press "Insert Media"
|
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>"
|
78
|
+
|
79
|
+
When I make a selection for "iframe"
|
80
|
+
And click on the "Insert Media" button
|
81
|
+
Then the "media_youtube_url" field should contain "http://youtu.be/Pny4hoN8eII"
|
82
|
+
|
83
|
+
When I fill in "YouTube Share URL" with "http://youtu.be/Pny4hoN8eI"
|
84
|
+
And fill in "Width" with "500"
|
85
|
+
And fill in "Height" with "300"
|
86
|
+
And press "Insert Media"
|
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>"
|
88
|
+
|
89
|
+
|
90
|
+
# Scenario: A user can embed and edit a vimeo video
|
91
|
+
Given the content of the editable region is simple content
|
92
|
+
And I make a selection
|
93
|
+
|
94
|
+
When I click on the "Insert Media" button
|
95
|
+
And choose "Vimeo URL"
|
96
|
+
And fill in "Vimeo URL" with "http://vimeo.com/25708134"
|
97
|
+
And fill in "Width" with "400"
|
98
|
+
And fill in "Height" with "200"
|
99
|
+
And press "Insert Media"
|
100
|
+
Then the contents of the editable 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
|
+
|
102
|
+
When I make a selection for "iframe"
|
103
|
+
And click on the "Insert Media" button
|
104
|
+
Then the "media_vimeo_url" field should contain "http://vimeo.com/25708134"
|
105
|
+
|
106
|
+
When I fill in "Vimeo URL" with "http://vimeo.com/2570813"
|
107
|
+
And fill in "Width" with "500"
|
108
|
+
And fill in "Height" with "300"
|
109
|
+
And press "Insert Media"
|
110
|
+
Then the contents of the editable 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>"
|
@@ -0,0 +1,102 @@
|
|
1
|
+
@javascript
|
2
|
+
Feature:
|
3
|
+
As a content editor type person
|
4
|
+
In order to reuse content chunks
|
5
|
+
I should be able to put snippets into regions
|
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
|
+
# 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 an editable region
|
16
|
+
Given the content of the editable region is simple content
|
17
|
+
And I make a selection
|
18
|
+
|
19
|
+
When I open the snippet panel
|
20
|
+
And I drag the example snippet into the editable region
|
21
|
+
Then the modal window should be visible
|
22
|
+
And I should see "Snippet Options" within the modal title
|
23
|
+
|
24
|
+
When I fill in "First Name" with "Jeremy"
|
25
|
+
And fill in "Favorite Beer" with "Stella"
|
26
|
+
And press "Insert Snippet"
|
27
|
+
Then the modal window should not be visible
|
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>"
|
29
|
+
|
30
|
+
|
31
|
+
Scenario: A user can use the snippet toolbar to remove a snippet
|
32
|
+
Given the options for the example snippet "snippet_42" are first_name: "Jeremy", favorite_beer: "Stella"
|
33
|
+
And the content of the editable region has that snippet
|
34
|
+
|
35
|
+
When I hover over the snippet
|
36
|
+
Then the snippet toolbar should be visible
|
37
|
+
|
38
|
+
When I click on the remove snippet toolbar button
|
39
|
+
Then the contents of the editable region should be " <b>content</b>"
|
40
|
+
|
41
|
+
|
42
|
+
Scenario: A user can use the snippet toolbar to edit the options of a snippet
|
43
|
+
Given the options for the example snippet "snippet_42" are first_name: "Hipsters", favorite_beer: "PBR"
|
44
|
+
And the content of the editable region has that snippet
|
45
|
+
|
46
|
+
When I hover over the snippet
|
47
|
+
And click on the edit snippet settings toolbar button
|
48
|
+
Then the modal window should be visible
|
49
|
+
And the "First Name" field should contain "Hipsters"
|
50
|
+
And the "Favorite Beer" field should contain "PBR"
|
51
|
+
|
52
|
+
When I fill in "First Name" with "Jeremy"
|
53
|
+
And fill in "Favorite Beer" with "Stella"
|
54
|
+
And press "Insert Snippet"
|
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>"
|
56
|
+
|
57
|
+
|
58
|
+
Scenario: A user can make changes to a snippets options, and they'll be versioned for undo and redo
|
59
|
+
Given the options for the example snippet "snippet_42" are first_name: "Hipsters", favorite_beer: "PBR"
|
60
|
+
And the content of the editable region has that snippet
|
61
|
+
|
62
|
+
When I edit the snippet
|
63
|
+
And I fill in "First Name" with "Jeremy"
|
64
|
+
And fill in "Favorite Beer" with "Stella"
|
65
|
+
And press "Insert Snippet"
|
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>"
|
67
|
+
|
68
|
+
When I edit the snippet
|
69
|
+
Then the "First Name" field should contain "Jeremy"
|
70
|
+
And the "Favorite Beer" field should contain "Stella"
|
71
|
+
|
72
|
+
When fill in "First Name" with "Diesel"
|
73
|
+
And fill in "Favorite Beer" with "Bells Hopslam"
|
74
|
+
And press "Insert Snippet"
|
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>"
|
76
|
+
|
77
|
+
When I click on the "Undo" button
|
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>"
|
79
|
+
|
80
|
+
When I edit the snippet
|
81
|
+
# todo: this is a bug
|
82
|
+
# Then the "First Name" field should contain "Jeremy"
|
83
|
+
# And the "Favorite Beer" field should contain "Stella"
|
84
|
+
|
85
|
+
When I close the modal
|
86
|
+
When I click on the "Redo" button
|
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>"
|
88
|
+
|
89
|
+
When I edit the snippet
|
90
|
+
Then the "First Name" field should contain "Diesel"
|
91
|
+
And the "Favorite Beer" field should contain "Bells Hopslam"
|
92
|
+
|
93
|
+
When I fill in "First Name" with "Jen"
|
94
|
+
And fill in "Favorite Beer" with "Miller High Life"
|
95
|
+
And press "Insert Snippet"
|
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>"
|
97
|
+
|
98
|
+
|
99
|
+
# Scenario: When a user saves, the snippets should be gone from the html, but the options are serialized
|
100
|
+
# Given the options for the example snippet "snippet_42" are first_name: "Hipsters", favorite_beer: "PBR"
|
101
|
+
# And the content of the editable region has that snippet
|
102
|
+
# When I click on the "Save" button
|
@@ -0,0 +1,24 @@
|
|
1
|
+
@javascript
|
2
|
+
Feature:
|
3
|
+
As a content editor type person
|
4
|
+
In order to manage content
|
5
|
+
I should be able to insert characters that are otherwise hard
|
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 special characters
|
15
|
+
Given the content of the editable region is simple content
|
16
|
+
And I make a selection
|
17
|
+
|
18
|
+
When I click on the "Insert Character" button
|
19
|
+
Then the modal window should be visible
|
20
|
+
And I should see "Special Characters" within the modal title
|
21
|
+
|
22
|
+
When I click on the sweet snowman
|
23
|
+
Then the modal window should not be visible
|
24
|
+
And the contents of the editable 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 editable 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 editable 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 an editable region)
|
61
|
+
Given the content of the editable 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 editable 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 editable 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 editable 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 editable 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 editable 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 editable 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 an editable region)
|
91
|
+
Given the content of the editable 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 editable 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 editable 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 an editable region)
|
102
|
+
Given the content of the editable 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 editable 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 editable 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
|