summaryrefslogtreecommitdiff
path: root/spec/support/shared_examples/features/content_editor_shared_examples.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/shared_examples/features/content_editor_shared_examples.rb')
-rw-r--r--spec/support/shared_examples/features/content_editor_shared_examples.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/support/shared_examples/features/content_editor_shared_examples.rb b/spec/support/shared_examples/features/content_editor_shared_examples.rb
index 5c44cb7f04b..c93d8e3d511 100644
--- a/spec/support/shared_examples/features/content_editor_shared_examples.rb
+++ b/spec/support/shared_examples/features/content_editor_shared_examples.rb
@@ -23,6 +23,8 @@ RSpec.shared_examples 'edits content using the content editor' do
describe 'code block bubble menu' do
it 'shows a code block bubble menu for a code block' do
+ find(content_editor_testid).send_keys [:enter, :enter]
+
find(content_editor_testid).send_keys '```js ' # trigger input rule
find(content_editor_testid).send_keys 'var a = 0'
find(content_editor_testid).send_keys [:shift, :left]
@@ -32,6 +34,8 @@ RSpec.shared_examples 'edits content using the content editor' do
end
it 'sets code block type to "javascript" for `js`' do
+ find(content_editor_testid).send_keys [:enter, :enter]
+
find(content_editor_testid).send_keys '```js '
find(content_editor_testid).send_keys 'var a = 0'
@@ -39,6 +43,8 @@ RSpec.shared_examples 'edits content using the content editor' do
end
it 'sets code block type to "Custom (nomnoml)" for `nomnoml`' do
+ find(content_editor_testid).send_keys [:enter, :enter]
+
find(content_editor_testid).send_keys '```nomnoml '
find(content_editor_testid).send_keys 'test'