diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-26 00:09:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-26 00:09:51 +0300 |
commit | 27852d1997e461079865ca6bd35145ed5cc5ccaf (patch) | |
tree | e20383d11241b17f9c2399128b293a472d096a26 /spec/views | |
parent | e2c80979588d801d6def0dab9e3bf180ae91cf01 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/views')
-rw-r--r-- | spec/views/admin/dashboard/index.html.haml_spec.rb | 2 | ||||
-rw-r--r-- | spec/views/layouts/nav/sidebar/_admin.html.haml_spec.rb | 18 | ||||
-rw-r--r-- | spec/views/profiles/preferences/show.html.haml_spec.rb | 8 |
3 files changed, 27 insertions, 1 deletions
diff --git a/spec/views/admin/dashboard/index.html.haml_spec.rb b/spec/views/admin/dashboard/index.html.haml_spec.rb index 70fb77944cc..e9223c84674 100644 --- a/spec/views/admin/dashboard/index.html.haml_spec.rb +++ b/spec/views/admin/dashboard/index.html.haml_spec.rb @@ -37,7 +37,7 @@ RSpec.describe 'admin/dashboard/index.html.haml' do render expect(rendered).not_to have_content "Users in License" - expect(rendered).not_to have_content "Active Users" + expect(rendered).not_to have_content "Billable Users" expect(rendered).not_to have_content "Maximum Users" expect(rendered).not_to have_content "Users over License" end diff --git a/spec/views/layouts/nav/sidebar/_admin.html.haml_spec.rb b/spec/views/layouts/nav/sidebar/_admin.html.haml_spec.rb index 777dc0c8571..2c37565328a 100644 --- a/spec/views/layouts/nav/sidebar/_admin.html.haml_spec.rb +++ b/spec/views/layouts/nav/sidebar/_admin.html.haml_spec.rb @@ -92,7 +92,11 @@ RSpec.describe 'layouts/nav/sidebar/_admin' do end context 'on settings' do + let(:gitlab_com?) { false } + before do + allow(::Gitlab).to receive(:com?) { gitlab_com? } + render end @@ -100,6 +104,20 @@ RSpec.describe 'layouts/nav/sidebar/_admin' do expect(rendered).to have_link('General', href: general_admin_application_settings_path) end + context 'when GitLab.com' do + let(:gitlab_com?) { true } + + it 'does not include Integrations link' do + expect(rendered).not_to have_link('Integrations', href: integrations_admin_application_settings_path) + end + end + + context 'when not GitLab.com' do + it 'includes Integrations link' do + expect(rendered).to have_link('Integrations', href: integrations_admin_application_settings_path) + end + end + context 'when GitLab FOSS' do it 'does not include Templates link' do expect(rendered).not_to have_link('Templates', href: '/admin/application_settings/templates') diff --git a/spec/views/profiles/preferences/show.html.haml_spec.rb b/spec/views/profiles/preferences/show.html.haml_spec.rb index 1b8b28367c1..1dae953227d 100644 --- a/spec/views/profiles/preferences/show.html.haml_spec.rb +++ b/spec/views/profiles/preferences/show.html.haml_spec.rb @@ -20,6 +20,14 @@ RSpec.describe 'profiles/preferences/show' do it 'has an id for anchoring' do expect(rendered).to have_css('#navigation-theme') end + + it 'has correct stylesheet tags' do + Gitlab::Themes.each do |theme| + next unless theme.css_filename + + expect(rendered).to have_selector("link[href*=\"themes/#{theme.css_filename}\"]", visible: false) + end + end end context 'syntax highlighting theme' do |