BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
7 deletions
+6
-7
mr_widget_header.js
...s/vue_merge_request_widget/components/mr_widget_header.js
+1
-1
mr_widget_closed.js
...erge_request_widget/components/states/mr_widget_closed.js
+1
-1
mr_widget_store.js
...cripts/vue_merge_request_widget/stores/mr_widget_store.js
+0
-1
mr_widget_header_spec.js
...scripts/vue_mr_widget/components/mr_widget_header_spec.js
+2
-2
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 {
: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
View file @
dd70776f
...
...
@@ -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/stores/mr_widget_store.js
View file @
dd70776f
...
...
@@ -43,7 +43,6 @@ export default class MergeRequestStore {
this
.
mergeUserId
=
data
.
merge_user_id
;
this
.
currentUserId
=
gon
.
current_user_id
;
this
.
sourceBranchPath
=
data
.
source_branch_path
;
this
.
targetBranchCommitsPath
=
data
.
target_branch_commits_path
;
this
.
sourceBranchLink
=
data
.
source_branch_with_namespace_link
;
this
.
mergeError
=
data
.
merge_error
;
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', () => {
divergedCommitsCount
:
12
,
sourceBranch
:
'mr-widget-refactor'
,
sourceBranchLink
:
`<a href="
${
sourceBranchPath
}
">mr-widget-refactor</a>`
,
targetBranch
Commits
Path
:
'foo/bar/commits-path'
,
targetBranchPath
:
'foo/bar/commits-path'
,
targetBranch
:
'master'
,
isOpen
:
true
,
emailPatchesPath
:
'/mr/email-patches'
,
...
...
@@ -73,7 +73,7 @@ describe('MRWidgetHeader', () => {
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
.
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
.
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
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
);
});
});
...
...
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