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 @@
.col-sm-12
%hr
.col-lg-4.profile-settings-sidebar
.col-lg-4.profile-settings-sidebar#integrations
%h4.gl-mt-0
= s_('Preferences|Integrations')
%p
......
......@@ -2,7 +2,7 @@
- @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|
.col-lg-4.application-theme
.col-lg-4.application-theme#navigation-theme
%h4.gl-mt-0
= s_('Preferences|Navigation theme')
%p
......@@ -18,7 +18,7 @@
.col-sm-12
%hr
.col-lg-4.profile-settings-sidebar
.col-lg-4.profile-settings-sidebar#syntax-highlighting-theme
%h4.gl-mt-0
= s_('Preferences|Syntax highlighting theme')
%p
......@@ -92,7 +92,7 @@
.col-sm-12
%hr
.col-lg-4.profile-settings-sidebar
.col-lg-4.profile-settings-sidebar#localization
%h4.gl-mt-0
= _('Localization')
%p
......
---
title: Add anchors to profile preferences
merge_request: 39589
author:
type: changed
......@@ -12,6 +12,26 @@ RSpec.describe 'profiles/preferences/show' do
allow(controller).to receive(:current_user).and_return(user)
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
before do
render
......@@ -21,7 +41,7 @@ RSpec.describe 'profiles/preferences/show' do
expect(rendered).to have_unchecked_field('Render whitespace characters in the Web IDE')
end
it 'has an id for anchoring on behavior' do
it 'has an id for anchoring' do
expect(rendered).to have_css('#behavior')
end
......@@ -31,13 +51,23 @@ RSpec.describe 'profiles/preferences/show' do
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
def have_sourcegraph_field(*args)
have_field('user_sourcegraph_enabled', *args)
end
def have_integrations_section
have_css('.profile-settings-sidebar', { text: 'Integrations' })
have_css('#integrations.profile-settings-sidebar', { text: 'Integrations' })
end
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