From 0c0c31ff34b3010c2c269ec56ef48dd305c6f74a Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Fri, 5 Jun 2015 13:57:01 -0400 Subject: Move the "Design" templates and logic to Preferences --- spec/features/profiles/preferences_spec.rb | 33 ++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 spec/features/profiles/preferences_spec.rb (limited to 'spec/features/profiles/preferences_spec.rb') diff --git a/spec/features/profiles/preferences_spec.rb b/spec/features/profiles/preferences_spec.rb new file mode 100644 index 00000000000..0e033652a9c --- /dev/null +++ b/spec/features/profiles/preferences_spec.rb @@ -0,0 +1,33 @@ +require 'spec_helper' + +describe 'Profile > Preferences' do + let(:user) { create(:user) } + + before do + login_as(user) + end + + describe 'User changes their application theme', js: true do + let(:default_class) { Gitlab::Theme.css_class_by_id(nil) } + let(:theme_5_class) { Gitlab::Theme.css_class_by_id(5) } + + before do + visit profile_preferences_path + end + + it 'changes immediately' do + expect(page).to have_selector("body.#{default.css_class}") + + choose "user_theme_id_#{theme.id}" + + expect(page).not_to have_selector("body.#{default.css_class}") + expect(page).to have_selector("body.#{theme.css_class}") + end + end + + describe 'User changes their syntax highlighting theme' do + before do + visit profile_preferences_path + end + end +end -- cgit v1.2.1