Commit 1d8ae6c4 authored by Kushal Pandya's avatar Kushal Pandya

Update popover URL to point to help page of same domain

parent 3d1daf1f
......@@ -121,7 +121,11 @@ export default {
return this.getPopoverConfig({
title: s__('Epics|These dates affect how your epics appear in the roadmap. Dates from milestones come from the milestones assigned to issues in the epic. You can also set fixed dates or remove them entirely.'),
content: `
<a href="https://docs.gitlab.com/ee/user/group/epics/#Dates">${s__('Epics|More information')}</a>
<a
href="${gon.gitlab_url}/help/user/group/epics/index.md#planned-start-date-and-planned-finish-date"
target="_blank"
rel="noopener noreferrer"
>${s__('Epics|More information')}</a>
`,
});
},
......@@ -129,7 +133,11 @@ export default {
return this.getPopoverConfig({
title: this.dateInvalidTooltip,
content: `
<a href="https://docs.gitlab.com/ee/user/group/epics/#Dates">${s__('Epics|How can I solve this?')}</a>
<a
href="${gon.gitlab_url}/help/user/group/epics/index.md#planned-start-date-and-planned-finish-date"
target="_blank"
rel="noopener noreferrer"
>${s__('Epics|How can I solve this?')}</a>
`,
});
},
......
......@@ -11,6 +11,7 @@ const createComponent = (datePickerProps = mockDatePickerProps) => {
};
describe('SidebarParticipants', () => {
window.gon = { gitlab_url: gl.TEST_HOST };
let vm;
beforeEach(() => {
......@@ -102,7 +103,9 @@ describe('SidebarParticipants', () => {
});
it('returns popover config object containing `content` with href pointing to correct documentation', () => {
expect(vm.popoverOptions.content.trim()).toBe('<a href="https://docs.gitlab.com/ee/user/group/epics/#Dates">More information</a>');
const hrefContent = vm.popoverOptions.content.trim();
expect(hrefContent).toContain(`${gon.gitlab_url}/help/user/group/epics/index.md#planned-start-date-and-planned-finish-date`);
expect(hrefContent).toContain('More information');
});
});
......@@ -112,7 +115,9 @@ describe('SidebarParticipants', () => {
});
it('returns popover config object containing `content` with href pointing to correct documentation', () => {
expect(vm.dateInvalidPopoverOptions.content.trim()).toBe('<a href="https://docs.gitlab.com/ee/user/group/epics/#Dates">How can I solve this?</a>');
const hrefContent = vm.dateInvalidPopoverOptions.content.trim();
expect(hrefContent).toContain(`${gon.gitlab_url}/help/user/group/epics/index.md#planned-start-date-and-planned-finish-date`);
expect(hrefContent).toContain('How can I solve this?');
});
});
});
......
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