Commit 5a5d5709 authored by Rajendra Kadam's avatar Rajendra Kadam

Change helper text to service ping

parent 257af818
import { __ } from '~/locale';
export const HELPER_TEXT_USAGE_PING_DISABLED = __(
export const HELPER_TEXT_SERVICE_PING_DISABLED = __(
'To enable Registration Features, make sure "Enable service ping" is checked.',
);
export const HELPER_TEXT_USAGE_PING_ENABLED = __(
export const HELPER_TEXT_SERVICE_PING_ENABLED = __(
'You can enable Registration Features because Service Ping is enabled. To continue using Registration Features in the future, you will also need to register with GitLab via a new cloud licensing service.',
);
......@@ -18,8 +18,8 @@ function setHelperText(usagePingCheckbox) {
);
helperTextId.textContent = usagePingCheckbox.checked
? HELPER_TEXT_USAGE_PING_ENABLED
: HELPER_TEXT_USAGE_PING_DISABLED;
? HELPER_TEXT_SERVICE_PING_ENABLED
: HELPER_TEXT_SERVICE_PING_DISABLED;
usagePingFeaturesLabel.classList.toggle('gl-cursor-not-allowed', !usagePingCheckbox.checked);
......
import initSetHelperText, {
HELPER_TEXT_USAGE_PING_DISABLED,
HELPER_TEXT_USAGE_PING_ENABLED,
HELPER_TEXT_SERVICE_PING_DISABLED,
HELPER_TEXT_SERVICE_PING_ENABLED,
} from '~/pages/admin/application_settings/metrics_and_profiling/usage_statistics';
describe('UsageStatistics', () => {
......@@ -23,12 +23,12 @@ describe('UsageStatistics', () => {
const expectEnabledUsagePingFeaturesCheckBox = () => {
expect(usagePingFeaturesCheckBox.classList.contains('gl-cursor-not-allowed')).toBe(false);
expect(usagePingFeaturesHelperText.textContent).toEqual(HELPER_TEXT_USAGE_PING_ENABLED);
expect(usagePingFeaturesHelperText.textContent).toEqual(HELPER_TEXT_SERVICE_PING_ENABLED);
};
const expectDisabledUsagePingFeaturesCheckBox = () => {
expect(usagePingFeaturesLabel.classList.contains('gl-cursor-not-allowed')).toBe(true);
expect(usagePingFeaturesHelperText.textContent).toEqual(HELPER_TEXT_USAGE_PING_DISABLED);
expect(usagePingFeaturesHelperText.textContent).toEqual(HELPER_TEXT_SERVICE_PING_DISABLED);
};
describe('Registration Features checkbox', () => {
......
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