Commit 3f2e4f24 authored by Phil Hughes's avatar Phil Hughes

Merge branch '7307-fix-epics-sidebar-popover-content-url' into 'master'

Update popover URL to point to help page of same domain

Closes #7307

See merge request gitlab-org/gitlab-ee!7446
parents db4de93c 456fd772
......@@ -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>
`,
});
},
......
---
title: Update popover URL to point to help page of same domain
merge_request: 7446
author:
type: fixed
......@@ -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