Skip to content
代码片段 群组 项目
未验证 提交 3c6db267 编辑于 作者: Lorenz van Herwaarden's avatar Lorenz van Herwaarden 提交者: GitLab
浏览文件

Open file link for new modal in new tab

The old finding modal opens file links in a new tab. This updates the
behavior of the new modal to also do this. While it's on the same
domain, we're leaving the current experience because going back would
not open the modal automatically.

Changelog: fixed
EE: true
上级 e5c4b45e
No related branches found
No related tags found
无相关合并请求
...@@ -320,7 +320,7 @@ export default { ...@@ -320,7 +320,7 @@ export default {
:label="$options.i18n.locationFileLabel" :label="$options.i18n.locationFileLabel"
data-testid="location-file-list-item" data-testid="location-file-list-item"
> >
<component :is="file.url ? 'gl-link' : 'span'" :href="file.url"> <component :is="file.url ? 'gl-link' : 'span'" :href="file.url" target="_blank">
{{ file.name }} {{ file.name }}
</component> </component>
</details-section-list-item> </details-section-list-item>
......
...@@ -474,6 +474,7 @@ describe('ee/security_dashboard/components/shared/vulnerability_details_graphql/ ...@@ -474,6 +474,7 @@ describe('ee/security_dashboard/components/shared/vulnerability_details_graphql/
expect(fileLink.attributes('href')).toBe(`${blobPath}#L${expectedLineRange}`); expect(fileLink.attributes('href')).toBe(`${blobPath}#L${expectedLineRange}`);
expect(fileLink.text()).toBe(`${file}:${expectedLineRange}`); expect(fileLink.text()).toBe(`${file}:${expectedLineRange}`);
expect(fileLink.attributes('target')).toBe('_blank');
}, },
); );
}); });
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册