Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
8f47540a
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8f47540a
编写于
5月 12, 2017
作者:
F
Filipa Lacerda
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'acet-mr-widget-fix-link' into 'master'
MRWidget: Fix target branch link. See merge request !11267
上级
6e78508c
dd70776f
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
16 addition
and
9 deletion
+16
-9
app/assets/javascripts/vue_merge_request_widget/components/mr_widget_header.js
...s/vue_merge_request_widget/components/mr_widget_header.js
+1
-1
app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_closed.js
...erge_request_widget/components/states/mr_widget_closed.js
+1
-1
app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_locked.js
...erge_request_widget/components/states/mr_widget_locked.js
+1
-1
app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merge_when_pipeline_succeeds.js
...mponents/states/mr_widget_merge_when_pipeline_succeeds.js
+1
-1
spec/javascripts/vue_mr_widget/components/mr_widget_header_spec.js
...scripts/vue_mr_widget/components/mr_widget_header_spec.js
+10
-3
spec/javascripts/vue_mr_widget/components/states/mr_widget_closed_spec.js
.../vue_mr_widget/components/states/mr_widget_closed_spec.js
+2
-2
未找到文件。
app/assets/javascripts/vue_merge_request_widget/components/mr_widget_header.js
浏览文件 @
8f47540a
...
...
@@ -83,7 +83,7 @@ export default {
:title="isBranchTitleLong(mr.targetBranch) ? mr.targetBranch : ''"
data-placement="bottom">
<a
:href="mr.targetBranch
Commits
Path">
:href="mr.targetBranchPath">
{{mr.targetBranch}}
</a>
</span>
...
...
app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_closed.js
浏览文件 @
8f47540a
...
...
@@ -20,7 +20,7 @@ export default {
<p>
The changes were not merged into
<a
:href="mr.targetBranch
Commits
Path"
:href="mr.targetBranchPath"
class="label-branch">
{{mr.targetBranch}}</a>.
</p>
...
...
app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_locked.js
浏览文件 @
8f47540a
...
...
@@ -16,7 +16,7 @@ export default {
The changes will be merged into
<span class="label-branch">
<a :href="mr.targetBranchPath">{{mr.targetBranch}}</a>
</span>
</span>
.
</p>
</section>
</div>
...
...
app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merge_when_pipeline_succeeds.js
浏览文件 @
8f47540a
...
...
@@ -87,7 +87,7 @@ export default {
:href="mr.targetBranchPath"
class="label-branch">
{{mr.targetBranch}}
</a>
</a>
.
</p>
<p v-if="mr.shouldRemoveSourceBranch">
The source branch will be removed.
...
...
spec/javascripts/vue_mr_widget/components/mr_widget_header_spec.js
浏览文件 @
8f47540a
...
...
@@ -48,10 +48,12 @@ describe('MRWidgetHeader', () => {
describe
(
'
template
'
,
()
=>
{
let
vm
;
let
el
;
const
sourceBranchPath
=
'
/foo/bar/mr-widget-refactor
'
;
const
mr
=
{
divergedCommitsCount
:
12
,
sourceBranch
:
'
mr-widget-refactor
'
,
sourceBranchLink
:
'
/foo/bar/mr-widget-refactor
'
,
sourceBranchLink
:
`<a href="
${
sourceBranchPath
}
">mr-widget-refactor</a>`
,
targetBranchPath
:
'
foo/bar/commits-path
'
,
targetBranch
:
'
master
'
,
isOpen
:
true
,
emailPatchesPath
:
'
/mr/email-patches
'
,
...
...
@@ -65,8 +67,13 @@ describe('MRWidgetHeader', () => {
it
(
'
should render template elements correctly
'
,
()
=>
{
expect
(
el
.
classList
.
contains
(
'
mr-source-target
'
)).
toBeTruthy
();
expect
(
el
.
querySelectorAll
(
'
.label-branch
'
)[
0
].
textContent
).
toContain
(
mr
.
sourceBranch
);
expect
(
el
.
querySelectorAll
(
'
.label-branch
'
)[
1
].
textContent
).
toContain
(
mr
.
targetBranch
);
const
sourceBranchLink
=
el
.
querySelectorAll
(
'
.label-branch
'
)[
0
];
const
targetBranchLink
=
el
.
querySelectorAll
(
'
.label-branch
'
)[
1
];
expect
(
sourceBranchLink
.
textContent
).
toContain
(
mr
.
sourceBranch
);
expect
(
targetBranchLink
.
textContent
).
toContain
(
mr
.
targetBranch
);
expect
(
sourceBranchLink
.
querySelector
(
'
a
'
).
getAttribute
(
'
href
'
)).
toEqual
(
sourceBranchPath
);
expect
(
targetBranchLink
.
querySelector
(
'
a
'
).
getAttribute
(
'
href
'
)).
toEqual
(
mr
.
targetBranchPath
);
expect
(
el
.
querySelector
(
'
.diverged-commits-count
'
).
textContent
).
toContain
(
'
12 commits behind
'
);
expect
(
el
.
textContent
).
toContain
(
'
Check out branch
'
);
...
...
spec/javascripts/vue_mr_widget/components/states/mr_widget_closed_spec.js
浏览文件 @
8f47540a
...
...
@@ -3,7 +3,7 @@ import closedComponent from '~/vue_merge_request_widget/components/states/mr_wid
const
mr
=
{
targetBranch
:
'
good-branch
'
,
targetBranch
Commits
Path
:
'
/good-branch
'
,
targetBranchPath
:
'
/good-branch
'
,
closedBy
:
{
name
:
'
Fatih Acet
'
,
username
:
'
fatihacet
'
,
...
...
@@ -44,7 +44,7 @@ describe('MRWidgetClosed', () => {
expect
(
el
.
querySelector
(
'
h4
'
).
textContent
).
toContain
(
'
Closed by
'
);
expect
(
el
.
querySelector
(
'
h4
'
).
textContent
).
toContain
(
mr
.
closedBy
.
name
);
expect
(
el
.
textContent
).
toContain
(
'
The changes were not merged into
'
);
expect
(
el
.
querySelector
(
'
.label-branch
'
).
getAttribute
(
'
href
'
)).
toEqual
(
mr
.
targetBranch
Commits
Path
);
expect
(
el
.
querySelector
(
'
.label-branch
'
).
getAttribute
(
'
href
'
)).
toEqual
(
mr
.
targetBranchPath
);
expect
(
el
.
querySelector
(
'
.label-branch
'
).
textContent
).
toContain
(
mr
.
targetBranch
);
});
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录