diff options
author | Annabel Dunstone Gray <annabel.dunstone@gmail.com> | 2017-12-20 22:29:44 +0300 |
---|---|---|
committer | Annabel Dunstone Gray <annabel.dunstone@gmail.com> | 2017-12-20 22:31:17 +0300 |
commit | d40f393d2c99e4a36d097471acf9379f12c34f19 (patch) | |
tree | 1bea37e8f5e7320b90867af37ad94dd928fb1ef9 /spec | |
parent | 9addd98035fb76636c28782abb1dd81e09c456c6 (diff) |
Add spec for previewing a note
Diffstat (limited to 'spec')
-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) |