diff options
author | Douwe Maan <douwe@gitlab.com> | 2018-06-07 16:54:41 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-06-07 16:54:41 +0000 |
commit | 290ca339adc952bcd939d1782af95f90d3b88716 (patch) | |
tree | 99d6b6bc75727949f1d3410bef321d31406668ca /spec/features | |
parent | 7b562c972713d19c2e537eb4df7cbe072ada8bbe (diff) | |
parent | 366e1331692900300df42e9c38fc17bd46b7ca1c (diff) | |
download | gitlab-ce-290ca339adc952bcd939d1782af95f90d3b88716.tar.gz |
Merge branch 'feature/customizable-favicon' into 'master'
Customizable favicon
Closes #15661
See merge request gitlab-org/gitlab-ce!14497
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/admin/admin_appearance_spec.rb | 20 | ||||
-rw-r--r-- | spec/features/merge_request/user_creates_image_diff_notes_spec.rb | 2 |
2 files changed, 21 insertions, 1 deletions
diff --git a/spec/features/admin/admin_appearance_spec.rb b/spec/features/admin/admin_appearance_spec.rb index d91dcf76191..a5e0ac592b9 100644 --- a/spec/features/admin/admin_appearance_spec.rb +++ b/spec/features/admin/admin_appearance_spec.rb @@ -76,6 +76,26 @@ feature 'Admin Appearance' do expect(page).not_to have_css(header_logo_selector) end + scenario 'Favicon' do + sign_in(create(:admin)) + visit admin_appearances_path + + attach_file(:appearance_favicon, logo_fixture) + click_button 'Save' + + expect(page).to have_css('.appearance-light-logo-preview') + + click_link 'Remove favicon' + + expect(page).not_to have_css('.appearance-light-logo-preview') + + # allowed file types + attach_file(:appearance_favicon, Rails.root.join('spec', 'fixtures', 'sanitized.svg')) + click_button 'Save' + + expect(page).to have_content 'Favicon You are not allowed to upload "svg" files, allowed types: png, ico' + end + def expect_custom_sign_in_appearance(appearance) expect(page).to have_content appearance.title expect(page).to have_content appearance.description diff --git a/spec/features/merge_request/user_creates_image_diff_notes_spec.rb b/spec/features/merge_request/user_creates_image_diff_notes_spec.rb index 7c4fd25bb39..25c408516d1 100644 --- a/spec/features/merge_request/user_creates_image_diff_notes_spec.rb +++ b/spec/features/merge_request/user_creates_image_diff_notes_spec.rb @@ -12,7 +12,7 @@ feature 'Merge request > User creates image diff notes', :js do # Stub helper to return any blob file as image from public app folder. # This is necessary to run this specs since we don't display repo images in capybara. allow_any_instance_of(DiffHelper).to receive(:diff_file_blob_raw_url).and_return('/apple-touch-icon.png') - allow_any_instance_of(DiffHelper).to receive(:diff_file_old_blob_raw_url).and_return('/favicon.ico') + allow_any_instance_of(DiffHelper).to receive(:diff_file_old_blob_raw_url).and_return('/favicon.png') end context 'create commit diff notes' do |