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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
c15c804a
Commit
c15c804a
authored
Apr 11, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
78ad761d
423f82d4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
0 deletions
+47
-0
app/assets/javascripts/ide/stores/mutations/merge_request.js
app/assets/javascripts/ide/stores/mutations/merge_request.js
+3
-0
changelogs/unreleased/fixed-web-ide-merge-request-review.yml
changelogs/unreleased/fixed-web-ide-merge-request-review.yml
+5
-0
spec/features/ide/user_opens_merge_request_spec.rb
spec/features/ide/user_opens_merge_request_spec.rb
+21
-0
spec/frontend/ide/stores/mutations/merge_request_spec.js
spec/frontend/ide/stores/mutations/merge_request_spec.js
+18
-0
No files found.
app/assets/javascripts/ide/stores/mutations/merge_request.js
View file @
c15c804a
...
...
@@ -7,6 +7,8 @@ export default {
});
},
[
types
.
SET_MERGE_REQUEST
](
state
,
{
projectPath
,
mergeRequestId
,
mergeRequest
})
{
const
existingMergeRequest
=
state
.
projects
[
projectPath
].
mergeRequests
[
mergeRequestId
]
||
{};
Object
.
assign
(
state
.
projects
[
projectPath
],
{
mergeRequests
:
{
[
mergeRequestId
]:
{
...
...
@@ -15,6 +17,7 @@ export default {
changes
:
[],
versions
:
[],
baseCommitSha
:
null
,
...
existingMergeRequest
,
},
},
});
...
...
changelogs/unreleased/fixed-web-ide-merge-request-review.yml
0 → 100644
View file @
c15c804a
---
title
:
Fixed Web IDE not loading merge request files
merge_request
:
author
:
type
:
fixed
spec/features/ide/user_opens_merge_request_spec.rb
0 → 100644
View file @
c15c804a
require
'spec_helper'
describe
'IDE merge request'
,
:js
do
let
(
:merge_request
)
{
create
(
:merge_request
,
:with_diffs
,
:simple
,
source_project:
project
)
}
let
(
:project
)
{
create
(
:project
,
:public
,
:repository
)
}
let
(
:user
)
{
project
.
owner
}
before
do
sign_in
(
user
)
visit
(
merge_request_path
(
merge_request
))
end
it
'user opens merge request'
do
click_link
'Open in Web IDE'
wait_for_requests
expect
(
page
).
to
have_selector
(
'.monaco-diff-editor'
)
end
end
spec/frontend/ide/stores/mutations/merge_request_spec.js
View file @
c15c804a
...
...
@@ -32,6 +32,24 @@ describe('IDE store merge request mutations', () => {
expect
(
newMr
.
title
).
toBe
(
'
mr
'
);
expect
(
newMr
.
active
).
toBeTruthy
();
});
it
(
'
keeps original data
'
,
()
=>
{
const
versions
=
[
'
change
'
];
const
mergeRequest
=
localState
.
projects
.
abcproject
.
mergeRequests
[
1
];
mergeRequest
.
versions
=
versions
;
mutations
.
SET_MERGE_REQUEST
(
localState
,
{
projectPath
:
'
abcproject
'
,
mergeRequestId
:
1
,
mergeRequest
:
{
title
:
[
'
change
'
],
},
});
expect
(
mergeRequest
.
title
).
toBe
(
'
mr
'
);
expect
(
mergeRequest
.
versions
).
toEqual
(
versions
);
});
});
describe
(
'
SET_MERGE_REQUEST_CHANGES
'
,
()
=>
{
...
...
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