diff options
author | Jose Ivan Vargas <jvargas@gitlab.com> | 2018-01-04 21:31:05 +0300 |
---|---|---|
committer | Tim Zallmann <tzallmann@gitlab.com> | 2018-01-04 21:31:05 +0300 |
commit | 0a35f372d232a0ac6b9355d27a9fb9e95b1ee959 (patch) | |
tree | 5db2e9918049e57ec8f1e8d1a574977160eb92f3 /spec/features | |
parent | 54bbcc3df962b46d565bc0274e2932c7a718fdc6 (diff) |
Added multi editor setting on the profile preferences page
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/profiles/user_visits_profile_preferences_page_spec.rb | 12 | ||||
-rw-r--r-- | spec/features/projects/user_edits_files_spec.rb | 4 |
2 files changed, 15 insertions, 1 deletions
diff --git a/spec/features/profiles/user_visits_profile_preferences_page_spec.rb b/spec/features/profiles/user_visits_profile_preferences_page_spec.rb index 90d6841af0e..266af8f4e3d 100644 --- a/spec/features/profiles/user_visits_profile_preferences_page_spec.rb +++ b/spec/features/profiles/user_visits_profile_preferences_page_spec.rb @@ -32,6 +32,18 @@ describe 'User visits the profile preferences page' do end end + describe 'User changes their multi file editor preferences', :js do + it 'set the new_repo cookie when the option is ON' do + choose 'user_multi_file_on' + expect(get_cookie('new_repo')).not_to be_nil + end + + it 'deletes the new_repo cookie when the option is OFF' do + choose 'user_multi_file_off' + expect(get_cookie('new_repo')).to be_nil + end + end + describe 'User changes their default dashboard', :js do it 'creates a flash message' do select 'Starred Projects', from: 'user_dashboard' diff --git a/spec/features/projects/user_edits_files_spec.rb b/spec/features/projects/user_edits_files_spec.rb index 5c5c6a398f6..05c2be473da 100644 --- a/spec/features/projects/user_edits_files_spec.rb +++ b/spec/features/projects/user_edits_files_spec.rb @@ -33,7 +33,9 @@ describe 'User edits files' do binary_file = File.join(project.repository.root_ref, 'files/images/logo-black.png') visit(project_blob_path(project, binary_file)) - expect(page).not_to have_link('edit') + page.within '.content' do + expect(page).not_to have_link('edit') + end end it 'commits an edited file', :js do |