Commit a4bee7d8 authored by Mark Florian's avatar Mark Florian

Merge branch '235858-add-anchors-to-profile-preferences' into 'master'

Add anchors to profile preferences

Closes #235858

See merge request gitlab-org/gitlab!39589
parents 8dd4c9f1 101d8922
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
.col-sm-12 .col-sm-12
%hr %hr
.col-lg-4.profile-settings-sidebar .col-lg-4.profile-settings-sidebar#integrations
%h4.gl-mt-0 %h4.gl-mt-0
= s_('Preferences|Integrations') = s_('Preferences|Integrations')
%p %p
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
- @content_class = "limit-container-width" unless fluid_layout - @content_class = "limit-container-width" unless fluid_layout
= form_for @user, url: profile_preferences_path, remote: true, method: :put, html: { class: 'row gl-mt-3 js-preferences-form' } do |f| = form_for @user, url: profile_preferences_path, remote: true, method: :put, html: { class: 'row gl-mt-3 js-preferences-form' } do |f|
.col-lg-4.application-theme .col-lg-4.application-theme#navigation-theme
%h4.gl-mt-0 %h4.gl-mt-0
= s_('Preferences|Navigation theme') = s_('Preferences|Navigation theme')
%p %p
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
.col-sm-12 .col-sm-12
%hr %hr
.col-lg-4.profile-settings-sidebar .col-lg-4.profile-settings-sidebar#syntax-highlighting-theme
%h4.gl-mt-0 %h4.gl-mt-0
= s_('Preferences|Syntax highlighting theme') = s_('Preferences|Syntax highlighting theme')
%p %p
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
.col-sm-12 .col-sm-12
%hr %hr
.col-lg-4.profile-settings-sidebar .col-lg-4.profile-settings-sidebar#localization
%h4.gl-mt-0 %h4.gl-mt-0
= _('Localization') = _('Localization')
%p %p
......
---
title: Add anchors to profile preferences
merge_request: 39589
author:
type: changed
...@@ -12,6 +12,26 @@ RSpec.describe 'profiles/preferences/show' do ...@@ -12,6 +12,26 @@ RSpec.describe 'profiles/preferences/show' do
allow(controller).to receive(:current_user).and_return(user) allow(controller).to receive(:current_user).and_return(user)
end end
context 'navigation theme' do
before do
render
end
it 'has an id for anchoring' do
expect(rendered).to have_css('#navigation-theme')
end
end
context 'syntax highlighting theme' do
before do
render
end
it 'has an id for anchoring' do
expect(rendered).to have_css('#syntax-highlighting-theme')
end
end
context 'behavior' do context 'behavior' do
before do before do
render render
...@@ -21,7 +41,7 @@ RSpec.describe 'profiles/preferences/show' do ...@@ -21,7 +41,7 @@ RSpec.describe 'profiles/preferences/show' do
expect(rendered).to have_unchecked_field('Render whitespace characters in the Web IDE') expect(rendered).to have_unchecked_field('Render whitespace characters in the Web IDE')
end end
it 'has an id for anchoring on behavior' do it 'has an id for anchoring' do
expect(rendered).to have_css('#behavior') expect(rendered).to have_css('#behavior')
end end
...@@ -31,13 +51,23 @@ RSpec.describe 'profiles/preferences/show' do ...@@ -31,13 +51,23 @@ RSpec.describe 'profiles/preferences/show' do
end end
end end
context 'localization' do
before do
render
end
it 'has an id for anchoring' do
expect(rendered).to have_css('#localization')
end
end
context 'sourcegraph' do context 'sourcegraph' do
def have_sourcegraph_field(*args) def have_sourcegraph_field(*args)
have_field('user_sourcegraph_enabled', *args) have_field('user_sourcegraph_enabled', *args)
end end
def have_integrations_section def have_integrations_section
have_css('.profile-settings-sidebar', { text: 'Integrations' }) have_css('#integrations.profile-settings-sidebar', { text: 'Integrations' })
end end
before do before do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment