Skip to content
Snippets Groups Projects
Commit 41dadc37 authored by Robert Speicher's avatar Robert Speicher
Browse files

Fix Preferences feature spec

parent a28686d3
No related branches found
No related tags found
No related merge requests found
require 'spec_helper'
 
describe 'Profile > Preferences' do
let(:user) { create(:user) }
before do
login_as(user)
login_as(:user)
visit profile_preferences_path
end
 
Loading
Loading
@@ -13,27 +11,27 @@ describe 'Profile > Preferences' do
let(:theme_5_class) { Gitlab::Theme.css_class_by_id(5) }
 
it 'creates a flash message' do
choose "user_theme_id_#{theme.id}"
choose 'user_theme_id_5'
 
expect_preferences_saved_message
end
 
it 'updates their preference' do
choose "user_theme_id_#{theme.id}"
choose 'user_theme_id_5'
 
allowing_for_delay do
visit page.current_path
expect(page).to have_checked_field("user_theme_id_#{theme.id}")
expect(page).to have_checked_field("user_theme_id_5")
end
end
 
it 'reflects the changes immediately' do
expect(page).to have_selector("body.#{default.css_class}")
expect(page).to have_selector("body.#{default_class}")
 
choose "user_theme_id_#{theme.id}"
choose 'user_theme_id_5'
 
expect(page).not_to have_selector("body.#{default.css_class}")
expect(page).to have_selector("body.#{theme.css_class}")
expect(page).not_to have_selector("body.#{default_class}")
expect(page).to have_selector("body.#{theme_5_class}")
end
end
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment