Commit 70b40180 authored by Filipa Lacerda's avatar Filipa Lacerda

Merge branch '4911-links-in-issue-board-are-broken' into 'master'

Resolve "Links in issue board are broken"

Closes #4911

See merge request gitlab-org/gitlab-ee!4494
parents e5a4ab49 0573b3d5
......@@ -176,6 +176,7 @@ export default {
<loading-icon />
</div>
<board-new-issue
:group-id="groupId"
:list="list"
v-if="list.type !== 'closed' && showIssueForm"/>
<ul
......@@ -191,6 +192,7 @@ export default {
:list="list"
:issue="issue"
:issue-link-base="issueLinkBase"
:group-id="groupId"
:root-path="rootPath"
:disabled="disabled"
:key="issue.id" />
......
......@@ -38,6 +38,9 @@ describe('Board list component', () => {
confidential: false,
labels: [],
assignees: [],
project: {
path: '/test',
},
});
list.issuesSize = 1;
list.issues.push(issue);
......@@ -49,7 +52,8 @@ describe('Board list component', () => {
list,
issues: list.issues,
loading: false,
issueLinkBase: '/issues',
groupId: 1,
issueLinkBase: '/test/:project_path/issues',
rootPath: '/',
},
}).$mount();
......@@ -87,6 +91,12 @@ describe('Board list component', () => {
).toBe(1);
});
it('renders link properly in issue', () => {
expect(
component.$el.querySelector('.card .card-title a').getAttribute('href'),
).not.toContain(':project_path');
});
it('sets data attribute with issue id', () => {
expect(
component.$el.querySelector('.card').getAttribute('data-issue-id'),
......
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