summaryrefslogtreecommitdiff
path: root/spec/features/merge_requests
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2017-12-21 10:00:13 +0000
committerFilipa Lacerda <filipa@gitlab.com>2017-12-21 10:00:13 +0000
commitb62368235b40743e5b010aa8fc6fc2058bf1effa (patch)
treecfe60e41e24d02b659475cd7514e1b6016a780de /spec/features/merge_requests
parentbc8e328fe4df7965e3ad80ee722cceb7c5b16261 (diff)
parentd40f393d2c99e4a36d097471acf9379f12c34f19 (diff)
downloadgitlab-ce-b62368235b40743e5b010aa8fc6fc2058bf1effa.tar.gz
Merge branch '40063-markdown-editor-improvements' into 'master'
Hide toolbar in markdown preview mode Closes #40063 See merge request gitlab-org/gitlab-ce!15994
Diffstat (limited to 'spec/features/merge_requests')
-rw-r--r--spec/features/merge_requests/user_posts_notes_spec.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/features/merge_requests/user_posts_notes_spec.rb b/spec/features/merge_requests/user_posts_notes_spec.rb
index f4c75a2f265..e17e9c2ccf5 100644
--- a/spec/features/merge_requests/user_posts_notes_spec.rb
+++ b/spec/features/merge_requests/user_posts_notes_spec.rb
@@ -66,6 +66,21 @@ describe 'Merge requests > User posts notes', :js do
end
end
+ describe 'when previewing a note' do
+ it 'shows the toolbar buttons when editing a note' do
+ page.within('.js-main-target-form') do
+ expect(page).to have_css('.md-header-toolbar.active')
+ end
+ end
+
+ it 'hides the toolbar buttons when previewing a note' do
+ find('.js-md-preview-button').click
+ page.within('.js-main-target-form') do
+ expect(page).not_to have_css('.md-header-toolbar.active')
+ end
+ end
+ end
+
describe 'when editing a note' do
it 'there should be a hidden edit form' do
is_expected.to have_css('.note-edit-form:not(.mr-note-edit-form)', visible: false, count: 1)