summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorAlexis Reigel <mail@koffeinfrei.org>2017-09-26 16:07:53 +0200
committerAlexis Reigel <mail@koffeinfrei.org>2018-06-05 16:20:19 +0200
commit40d8d7df4bd437efc81f0bdff5f93b4b65844cb5 (patch)
tree04cfbbadece1ce0849c62037a9379324e8b58012 /spec
parentff24be48556c8a7d8e9a55fc667d0713b90ac591 (diff)
downloadgitlab-ce-40d8d7df4bd437efc81f0bdff5f93b4b65844cb5.tar.gz
feature spec for managing appearance > favicon
Diffstat (limited to 'spec')
-rw-r--r--spec/features/admin/admin_appearance_spec.rb34
1 files changed, 34 insertions, 0 deletions
diff --git a/spec/features/admin/admin_appearance_spec.rb b/spec/features/admin/admin_appearance_spec.rb
index d91dcf76191..556aa10d226 100644
--- a/spec/features/admin/admin_appearance_spec.rb
+++ b/spec/features/admin/admin_appearance_spec.rb
@@ -76,6 +76,40 @@ 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('//img[data-src$="/default_dk.ico"]')
+ expect(page).to have_css('//img[data-src$="/status_canceled_dk.ico"]')
+ expect(page).to have_css('//img[data-src$="/status_created_dk.ico"]')
+ expect(page).to have_css('//img[data-src$="/status_failed_dk.ico"]')
+ expect(page).to have_css('//img[data-src$="/status_manual_dk.ico"]')
+ expect(page).to have_css('//img[data-src$="/status_not_found_dk.ico"]')
+ expect(page).to have_css('//img[data-src$="/status_pending_dk.ico"]')
+ expect(page).to have_css('//img[data-src$="/status_running_dk.ico"]')
+ expect(page).to have_css('//img[data-src$="/status_skipped_dk.ico"]')
+ expect(page).to have_css('//img[data-src$="/status_success_dk.ico"]')
+ expect(page).to have_css('//img[data-src$="/status_warning_dk.ico"]')
+
+ click_link 'Remove favicon'
+
+ expect(page).not_to have_css('//img[data-src$="/default_dk.ico"]')
+ expect(page).not_to have_css('//img[data-src$="/status_canceled_dk.ico"]')
+ expect(page).not_to have_css('//img[data-src$="/status_created_dk.ico"]')
+ expect(page).not_to have_css('//img[data-src$="/status_failed_dk.ico"]')
+ expect(page).not_to have_css('//img[data-src$="/status_manual_dk.ico"]')
+ expect(page).not_to have_css('//img[data-src$="/status_not_found_dk.ico"]')
+ expect(page).not_to have_css('//img[data-src$="/status_pending_dk.ico"]')
+ expect(page).not_to have_css('//img[data-src$="/status_running_dk.ico"]')
+ expect(page).not_to have_css('//img[data-src$="/status_skipped_dk.ico"]')
+ expect(page).not_to have_css('//img[data-src$="/status_success_dk.ico"]')
+ expect(page).not_to have_css('//img[data-src$="/status_warning_dk.ico"]')
+ end
+
def expect_custom_sign_in_appearance(appearance)
expect(page).to have_content appearance.title
expect(page).to have_content appearance.description