Commit 54f7c390 authored by Zack Cuddy's avatar Zack Cuddy

GitLab Version - CE Admin Dashboard

This change fixes a bug with the
version check on the Admin Dashbaord.

The original code as only implemented
in EE and thus never allowed the JS
to bootstrap to the CE code.

This change moves the location of the
import to the proper file.

Changelog: fixed
parent cc8589dc
import initGitlabVersionCheck from '~/gitlab_version_check';
import initAdminStatisticsPanel from '../../admin/statistics_panel/index';
import initVueAlerts from '../../vue_alerts';
import initAdmin from './admin';
initVueAlerts();
initGitlabVersionCheck();
const statisticsPanelContainer = document.getElementById('js-admin-statistics-container');
initAdmin();
......
import { shouldQrtlyReconciliationMount } from 'ee/billings/qrtly_reconciliation';
import initGitlabVersionCheck from '~/gitlab_version_check';
shouldQrtlyReconciliationMount();
initGitlabVersionCheck();
......@@ -99,6 +99,16 @@ RSpec.describe 'Admin Dashboard' do
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 quarterly co-term banner', path_to_visit: :admin_subscription_path
end
......@@ -53,4 +53,14 @@ RSpec.describe 'admin visits dashboard' do
expect(page).to have_content('Active users 71')
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
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