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
Tatuya Kamada
gitlab-ce
Commits
bbb01909
Commit
bbb01909
authored
Aug 11, 2016
by
Paco Guzman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix merge request new view not changing code view rendering style
parent
87b07f6a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
1 deletion
+21
-1
CHANGELOG
CHANGELOG
+1
-0
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+2
-0
spec/features/merge_requests/create_new_mr_spec.rb
spec/features/merge_requests/create_new_mr_spec.rb
+18
-1
No files found.
CHANGELOG
View file @
bbb01909
...
...
@@ -75,6 +75,7 @@ v 8.11.0 (unreleased)
- Speedup DiffNote#active? on discussions, preloading noteables and avoid touching git repository to return diff_refs when possible
- Add commit stats in commit api. !5517 (dixpac)
- Add CI configuration button on project page
- Fix merge request new view not changing code view rendering style
- Make error pages responsive (Takuya Noguchi)
- Fix skip_repo parameter being ignored when destroying a namespace
- Change requests_profiles resource constraint to catch virtually any file
...
...
app/controllers/projects/merge_requests_controller.rb
View file @
bbb01909
...
...
@@ -142,6 +142,8 @@ class Projects::MergeRequestsController < Projects::ApplicationController
end
def
new
apply_diff_view_cookie!
build_merge_request
@noteable
=
@merge_request
...
...
spec/features/merge_requests/create_new_mr_spec.rb
View file @
bbb01909
...
...
@@ -8,10 +8,11 @@ feature 'Create New Merge Request', feature: true, js: true do
project
.
team
<<
[
user
,
:master
]
login_as
user
visit
namespace_project_merge_requests_path
(
project
.
namespace
,
project
)
end
it
'generates a diff for an orphaned branch'
do
visit
namespace_project_merge_requests_path
(
project
.
namespace
,
project
)
click_link
'New Merge Request'
first
(
'.js-source-branch'
).
click
...
...
@@ -40,4 +41,20 @@ feature 'Create New Merge Request', feature: true, js: true do
expect
(
page
).
not_to
have_content
private_project
.
to_reference
end
end
it
'allows to change the diff view'
do
visit
new_namespace_project_merge_request_path
(
project
.
namespace
,
project
,
merge_request:
{
target_branch:
'master'
,
source_branch:
'fix'
})
click_link
'Changes'
expect
(
page
.
find_link
(
'Inline'
)[
:class
]).
to
match
(
/\bactive\b/
)
expect
(
page
.
find_link
(
'Side-by-side'
)[
:class
]).
not_to
match
(
/\bactive\b/
)
click_link
'Side-by-side'
click_link
'Changes'
expect
(
page
.
find_link
(
'Inline'
)[
:class
]).
not_to
match
(
/\bactive\b/
)
expect
(
page
.
find_link
(
'Side-by-side'
)[
:class
]).
to
match
(
/\bactive\b/
)
end
end
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