diff options
Diffstat (limited to 'spec/features/projects/files/user_edits_files_spec.rb')
-rw-r--r-- | spec/features/projects/files/user_edits_files_spec.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/features/projects/files/user_edits_files_spec.rb b/spec/features/projects/files/user_edits_files_spec.rb index 10fa4a21359..5612f6a53b2 100644 --- a/spec/features/projects/files/user_edits_files_spec.rb +++ b/spec/features/projects/files/user_edits_files_spec.rb @@ -79,6 +79,25 @@ RSpec.describe 'Projects > Files > User edits files', :js, feature_category: :gr expect(page).to have_content('*.rbca') end + it 'displays a flash message with a link when an edited file was committed' do + click_link('.gitignore') + edit_in_single_file_editor + find('.file-editor', match: :first) + + editor_set_value('*.rbca') + fill_in(:commit_message, with: 'New commit message', visible: true) + click_button('Commit changes') + + expect(page).to have_current_path(project_blob_path(project, 'master/.gitignore'), ignore_query: true) + + wait_for_requests + + expect(page).to have_content('Your changes have been committed successfully') + page.within '.flash-container' do + expect(page).to have_link 'changes' + end + end + it 'commits an edited file to a new branch' do click_link('.gitignore') edit_in_single_file_editor |