diff options
Diffstat (limited to 'spec/features/merge_requests')
-rw-r--r-- | spec/features/merge_requests/user_posts_notes_spec.rb | 15 |
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) |