Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
dd70776f
Commit
dd70776f
authored
May 12, 2017
by
Fatih Acet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MRWidget: Use targetBranchPath in everywhere.
parent
5d7d5098
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
7 deletions
+6
-7
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/stores/mr_widget_store.js
...cripts/vue_merge_request_widget/stores/mr_widget_store.js
+0
-1
spec/javascripts/vue_mr_widget/components/mr_widget_header_spec.js
...scripts/vue_mr_widget/components/mr_widget_header_spec.js
+2
-2
spec/javascripts/vue_mr_widget/components/states/mr_widget_closed_spec.js
.../vue_mr_widget/components/states/mr_widget_closed_spec.js
+2
-2
No files found.
app/assets/javascripts/vue_merge_request_widget/components/mr_widget_header.js
View file @
dd70776f
...
@@ -83,7 +83,7 @@ export default {
...
@@ -83,7 +83,7 @@ export default {
:title="isBranchTitleLong(mr.targetBranch) ? mr.targetBranch : ''"
:title="isBranchTitleLong(mr.targetBranch) ? mr.targetBranch : ''"
data-placement="bottom">
data-placement="bottom">
<a
<a
:href="mr.targetBranch
Commits
Path">
:href="mr.targetBranchPath">
{{mr.targetBranch}}
{{mr.targetBranch}}
</a>
</a>
</span>
</span>
...
...
app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_closed.js
View file @
dd70776f
...
@@ -20,7 +20,7 @@ export default {
...
@@ -20,7 +20,7 @@ export default {
<p>
<p>
The changes were not merged into
The changes were not merged into
<a
<a
:href="mr.targetBranch
Commits
Path"
:href="mr.targetBranchPath"
class="label-branch">
class="label-branch">
{{mr.targetBranch}}</a>.
{{mr.targetBranch}}</a>.
</p>
</p>
...
...
app/assets/javascripts/vue_merge_request_widget/stores/mr_widget_store.js
View file @
dd70776f
...
@@ -43,7 +43,6 @@ export default class MergeRequestStore {
...
@@ -43,7 +43,6 @@ export default class MergeRequestStore {
this
.
mergeUserId
=
data
.
merge_user_id
;
this
.
mergeUserId
=
data
.
merge_user_id
;
this
.
currentUserId
=
gon
.
current_user_id
;
this
.
currentUserId
=
gon
.
current_user_id
;
this
.
sourceBranchPath
=
data
.
source_branch_path
;
this
.
sourceBranchPath
=
data
.
source_branch_path
;
this
.
targetBranchCommitsPath
=
data
.
target_branch_commits_path
;
this
.
sourceBranchLink
=
data
.
source_branch_with_namespace_link
;
this
.
sourceBranchLink
=
data
.
source_branch_with_namespace_link
;
this
.
mergeError
=
data
.
merge_error
;
this
.
mergeError
=
data
.
merge_error
;
this
.
targetBranchPath
=
data
.
target_branch_commits_path
;
this
.
targetBranchPath
=
data
.
target_branch_commits_path
;
...
...
spec/javascripts/vue_mr_widget/components/mr_widget_header_spec.js
View file @
dd70776f
...
@@ -53,7 +53,7 @@ describe('MRWidgetHeader', () => {
...
@@ -53,7 +53,7 @@ describe('MRWidgetHeader', () => {
divergedCommitsCount
:
12
,
divergedCommitsCount
:
12
,
sourceBranch
:
'
mr-widget-refactor
'
,
sourceBranch
:
'
mr-widget-refactor
'
,
sourceBranchLink
:
`<a href="
${
sourceBranchPath
}
">mr-widget-refactor</a>`
,
sourceBranchLink
:
`<a href="
${
sourceBranchPath
}
">mr-widget-refactor</a>`
,
targetBranch
Commits
Path
:
'
foo/bar/commits-path
'
,
targetBranchPath
:
'
foo/bar/commits-path
'
,
targetBranch
:
'
master
'
,
targetBranch
:
'
master
'
,
isOpen
:
true
,
isOpen
:
true
,
emailPatchesPath
:
'
/mr/email-patches
'
,
emailPatchesPath
:
'
/mr/email-patches
'
,
...
@@ -73,7 +73,7 @@ describe('MRWidgetHeader', () => {
...
@@ -73,7 +73,7 @@ describe('MRWidgetHeader', () => {
expect
(
sourceBranchLink
.
textContent
).
toContain
(
mr
.
sourceBranch
);
expect
(
sourceBranchLink
.
textContent
).
toContain
(
mr
.
sourceBranch
);
expect
(
targetBranchLink
.
textContent
).
toContain
(
mr
.
targetBranch
);
expect
(
targetBranchLink
.
textContent
).
toContain
(
mr
.
targetBranch
);
expect
(
sourceBranchLink
.
querySelector
(
'
a
'
).
getAttribute
(
'
href
'
)).
toEqual
(
sourceBranchPath
);
expect
(
sourceBranchLink
.
querySelector
(
'
a
'
).
getAttribute
(
'
href
'
)).
toEqual
(
sourceBranchPath
);
expect
(
targetBranchLink
.
querySelector
(
'
a
'
).
getAttribute
(
'
href
'
)).
toEqual
(
mr
.
targetBranch
Commits
Path
);
expect
(
targetBranchLink
.
querySelector
(
'
a
'
).
getAttribute
(
'
href
'
)).
toEqual
(
mr
.
targetBranchPath
);
expect
(
el
.
querySelector
(
'
.diverged-commits-count
'
).
textContent
).
toContain
(
'
12 commits behind
'
);
expect
(
el
.
querySelector
(
'
.diverged-commits-count
'
).
textContent
).
toContain
(
'
12 commits behind
'
);
expect
(
el
.
textContent
).
toContain
(
'
Check out branch
'
);
expect
(
el
.
textContent
).
toContain
(
'
Check out branch
'
);
...
...
spec/javascripts/vue_mr_widget/components/states/mr_widget_closed_spec.js
View file @
dd70776f
...
@@ -3,7 +3,7 @@ import closedComponent from '~/vue_merge_request_widget/components/states/mr_wid
...
@@ -3,7 +3,7 @@ import closedComponent from '~/vue_merge_request_widget/components/states/mr_wid
const
mr
=
{
const
mr
=
{
targetBranch
:
'
good-branch
'
,
targetBranch
:
'
good-branch
'
,
targetBranch
Commits
Path
:
'
/good-branch
'
,
targetBranchPath
:
'
/good-branch
'
,
closedBy
:
{
closedBy
:
{
name
:
'
Fatih Acet
'
,
name
:
'
Fatih Acet
'
,
username
:
'
fatihacet
'
,
username
:
'
fatihacet
'
,
...
@@ -44,7 +44,7 @@ describe('MRWidgetClosed', () => {
...
@@ -44,7 +44,7 @@ describe('MRWidgetClosed', () => {
expect
(
el
.
querySelector
(
'
h4
'
).
textContent
).
toContain
(
'
Closed by
'
);
expect
(
el
.
querySelector
(
'
h4
'
).
textContent
).
toContain
(
'
Closed by
'
);
expect
(
el
.
querySelector
(
'
h4
'
).
textContent
).
toContain
(
mr
.
closedBy
.
name
);
expect
(
el
.
querySelector
(
'
h4
'
).
textContent
).
toContain
(
mr
.
closedBy
.
name
);
expect
(
el
.
textContent
).
toContain
(
'
The changes were not merged into
'
);
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
);
expect
(
el
.
querySelector
(
'
.label-branch
'
).
textContent
).
toContain
(
mr
.
targetBranch
);
});
});
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment