diff options
author | Stan Hu <stanhu@gmail.com> | 2015-08-24 23:35:26 -0700 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-08-25 09:20:20 -0700 |
commit | e8329f0db6e727af7b3a09bfa38e17402a811ea5 (patch) | |
tree | 498ec8fddb93ed2cdc634a72f23f264cdc750f9d | |
parent | c935deeb2db88ed766f8e296000eef34c74d7508 (diff) | |
download | gitlab-ce-e8329f0db6e727af7b3a09bfa38e17402a811ea5.tar.gz |
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.
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | app/views/projects/diffs/_warning.html.haml | 2 | ||||
-rw-r--r-- | features/project/commits/commits.feature | 1 | ||||
-rw-r--r-- | features/steps/project/commits/commits.rb | 6 |
4 files changed, 9 insertions, 1 deletions
diff --git a/CHANGELOG b/CHANGELOG index a37a52e2cde..394c9ab87b4 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,6 +3,7 @@ Please view this file on the master branch, on stable branches it's out of date. v 7.14.1 - Only include base URL in OmniAuth full_host parameter (Stan Hu) - Fix Error 500 in API when accessing a group that has an avatar (Stan Hu) + - Fix "Reload with full diff" URL button in compare branch view (Stan Hu) v 7.14.0 - Fix bug where non-project members of the target project could set labels on new merge requests. diff --git a/app/views/projects/diffs/_warning.html.haml b/app/views/projects/diffs/_warning.html.haml index caed0e69dc8..f99bc9a85eb 100644 --- a/app/views/projects/diffs/_warning.html.haml +++ b/app/views/projects/diffs/_warning.html.haml @@ -3,7 +3,7 @@ Too many changes to show. .pull-right - 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) diff --git a/features/project/commits/commits.feature b/features/project/commits/commits.feature index c4b206edc95..3ebc8a39aae 100644 --- a/features/project/commits/commits.feature +++ b/features/project/commits/commits.feature @@ -41,6 +41,7 @@ Feature: Project Commits Scenario: I browse big commit Given I visit big commit page Then I see big commit warning + And I see "Reload with full diff" link Scenario: I browse a commit with an image Given I visit a commit with an image that changed diff --git a/features/steps/project/commits/commits.rb b/features/steps/project/commits/commits.rb index e6330ec457e..a8532cc18d8 100644 --- a/features/steps/project/commits/commits.rb +++ b/features/steps/project/commits/commits.rb @@ -79,6 +79,12 @@ class Spinach::Features::ProjectCommits < Spinach::FeatureSteps expect(page).to have_content "Too many changes" 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 visit namespace_project_commit_path(@project.namespace, @project, sample_image_commit.id) end |