Commit 3a2b1276 authored by Olena Horal-Koretska's avatar Olena Horal-Koretska

Merge branch '351161-version-check-ce-fix' into 'master'

GitLab Version - CE Admin Dashboard [RUN ALL RSPEC] [RUN AS-IF-FOSS]

See merge request gitlab-org/gitlab!79258
parents 2e1808e3 54f7c390
import initGitlabVersionCheck from '~/gitlab_version_check';
import initAdminStatisticsPanel from '../../admin/statistics_panel/index'; import initAdminStatisticsPanel from '../../admin/statistics_panel/index';
import initVueAlerts from '../../vue_alerts'; import initVueAlerts from '../../vue_alerts';
import initAdmin from './admin'; import initAdmin from './admin';
initVueAlerts(); initVueAlerts();
initGitlabVersionCheck();
const statisticsPanelContainer = document.getElementById('js-admin-statistics-container'); const statisticsPanelContainer = document.getElementById('js-admin-statistics-container');
initAdmin(); initAdmin();
......
import { shouldQrtlyReconciliationMount } from 'ee/billings/qrtly_reconciliation'; import { shouldQrtlyReconciliationMount } from 'ee/billings/qrtly_reconciliation';
import initGitlabVersionCheck from '~/gitlab_version_check';
shouldQrtlyReconciliationMount(); shouldQrtlyReconciliationMount();
initGitlabVersionCheck();
...@@ -99,6 +99,16 @@ RSpec.describe 'Admin Dashboard' do ...@@ -99,6 +99,16 @@ RSpec.describe 'Admin Dashboard' do
end end
end end
describe 'Version check', :js do
it 'shows badge on EE' do
visit admin_root_path
page.within('.admin-dashboard') do
expect(find('.badge')).to have_content('Up to date')
end
end
end
include_examples 'manual renewal banner', path_to_visit: :admin_subscription_path include_examples 'manual renewal banner', path_to_visit: :admin_subscription_path
include_examples 'manual quarterly co-term banner', path_to_visit: :admin_subscription_path include_examples 'manual quarterly co-term banner', path_to_visit: :admin_subscription_path
end end
...@@ -53,4 +53,14 @@ RSpec.describe 'admin visits dashboard' do ...@@ -53,4 +53,14 @@ RSpec.describe 'admin visits dashboard' do
expect(page).to have_content('Active users 71') expect(page).to have_content('Active users 71')
end end
end end
describe 'Version check', :js do
it 'shows badge on CE' do
visit admin_root_path
page.within('.admin-dashboard') do
expect(find('.badge')).to have_content('Up to date')
end
end
end
end end
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