Commit 429c0d14 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'fix-reload-with-full-diff-in-compare-branch' into 'master'

Fix "Reload with full diff" URL button in compare branch view

This button worked when viewing merge requests because the JavaScript
stripped the .html in the Ajax request. However, it left the .html suffix
in the compare branch view.

See merge request !1195
parents 1c2ce6ef 3bee4a67
...@@ -2,6 +2,7 @@ Please view this file on the master branch, on stable branches it's out of date. ...@@ -2,6 +2,7 @@ Please view this file on the master branch, on stable branches it's out of date.
v 8.0.0 (unreleased) v 8.0.0 (unreleased)
- Upgrade browser gem to 1.0.0 to avoid warning in IE11 compatibilty mode (Stan Hu) - Upgrade browser gem to 1.0.0 to avoid warning in IE11 compatibilty mode (Stan Hu)
- Fix "Reload with full diff" URL button in compare branch view (Stan Hu)
- Remove user OAuth tokens from the database and request new tokens each session (Stan Hu) - Remove user OAuth tokens from the database and request new tokens each session (Stan Hu)
- Only show recent push event if the branch still exists or a recent merge request has not been created (Stan Hu) - Only show recent push event if the branch still exists or a recent merge request has not been created (Stan Hu)
- Remove satellites - Remove satellites
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
Too many changes to show. Too many changes to show.
.pull-right .pull-right
- unless diff_hard_limit_enabled? - unless diff_hard_limit_enabled?
= link_to "Reload with full diff", url_for(params.merge(force_show_diff: true, format: :html)), class: "btn btn-sm btn-warning" = link_to "Reload with full diff", url_for(params.merge(force_show_diff: true, format: nil)), class: "btn btn-sm btn-warning"
- if current_controller?(:commit) or current_controller?(:merge_requests) - if current_controller?(:commit) or current_controller?(:merge_requests)
- if current_controller?(:commit) - if current_controller?(:commit)
......
...@@ -41,6 +41,7 @@ Feature: Project Commits ...@@ -41,6 +41,7 @@ Feature: Project Commits
Scenario: I browse big commit Scenario: I browse big commit
Given I visit big commit page Given I visit big commit page
Then I see big commit warning Then I see big commit warning
And I see "Reload with full diff" link
Scenario: I browse a commit with an image Scenario: I browse a commit with an image
Given I visit a commit with an image that changed Given I visit a commit with an image that changed
......
...@@ -79,6 +79,12 @@ class Spinach::Features::ProjectCommits < Spinach::FeatureSteps ...@@ -79,6 +79,12 @@ class Spinach::Features::ProjectCommits < Spinach::FeatureSteps
expect(page).to have_content "Too many changes" expect(page).to have_content "Too many changes"
end end
step 'I see "Reload with full diff" link' do
link = find_link('Reload with full diff')
expect(link[:href]).to end_with('?force_show_diff=true')
expect(link[:href]).not_to include('.html')
end
step 'I visit a commit with an image that changed' do step 'I visit a commit with an image that changed' do
visit namespace_project_commit_path(@project.namespace, @project, sample_image_commit.id) visit namespace_project_commit_path(@project.namespace, @project, sample_image_commit.id)
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment