diff options
author | Stan Hu <stanhu@gmail.com> | 2015-03-24 00:07:17 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-03-24 00:19:41 -0700 |
commit | eecd897170c7f6428ba500610f368a1f3bdcbb8f (patch) | |
tree | 5bcae63b46811603c0fb28c0a4e1f8fc96ca30c7 | |
parent | c3c9703437a552700c2a6ca010b05cc56aa6d73a (diff) | |
download | gitlab-ce-eecd897170c7f6428ba500610f368a1f3bdcbb8f.tar.gz |
Fix code unfold not working on Compare commits page
Closes #1274
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | app/assets/javascripts/dispatcher.js.coffee | 4 | ||||
-rw-r--r-- | features/project/commits/commits.feature | 3 | ||||
-rw-r--r-- | features/steps/project/commits/commits.rb | 12 |
4 files changed, 20 insertions, 0 deletions
diff --git a/CHANGELOG b/CHANGELOG index 3ecc45cde07..b87f116af5d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ Please view this file on the master branch, on stable branches it's out of date. v 7.10.0 (unreleased) + - Fix code unfold not working on Compare commits page (Stan Hu) - Include missing events and fix save functionality in admin service template settings form (Stan Hu) - Fix "Import projects from" button to show the correct instructions (Stan Hu) - Fix dots in Wiki slugs causing errors (Stan Hu) diff --git a/app/assets/javascripts/dispatcher.js.coffee b/app/assets/javascripts/dispatcher.js.coffee index deabaf8a784..3535d8c2cfc 100644 --- a/app/assets/javascripts/dispatcher.js.coffee +++ b/app/assets/javascripts/dispatcher.js.coffee @@ -28,6 +28,8 @@ class Dispatcher new Milestone() when 'projects:milestones:new', 'projects:milestones:edit' new ZenMode() + when 'projects:compare:show' + new Diff() when 'projects:issues:new','projects:issues:edit' GitLab.GfmAutoComplete.setup() shortcut_handler = new ShortcutsNavigation() @@ -115,6 +117,8 @@ class Dispatcher new Project() new ProjectAvatar() switch path[1] + when 'compare' + shortcut_handler = new ShortcutsNavigation() when 'edit' shortcut_handler = new ShortcutsNavigation() new ProjectNew() diff --git a/features/project/commits/commits.feature b/features/project/commits/commits.feature index 46076b6f3e6..c4b206edc95 100644 --- a/features/project/commits/commits.feature +++ b/features/project/commits/commits.feature @@ -21,10 +21,13 @@ Feature: Project Commits And I click side-by-side diff button Then I see inline diff button + @javascript Scenario: I compare refs Given I visit compare refs page And I fill compare fields with refs Then I see compared refs + And I unfold diff + Then I should see additional file lines Scenario: I browse commits for a specific path Given I visit my project's commits page for a specific path diff --git a/features/steps/project/commits/commits.rb b/features/steps/project/commits/commits.rb index b2dccf868b0..57b727f837e 100644 --- a/features/steps/project/commits/commits.rb +++ b/features/steps/project/commits/commits.rb @@ -38,6 +38,18 @@ class Spinach::Features::ProjectCommits < Spinach::FeatureSteps click_button "Compare" end + step 'I unfold diff' do + @diff = first('.js-unfold') + @diff.click + sleep 2 + end + + step 'I should see additional file lines' do + within @diff.parent do + first('.new_line').text.should_not have_content "..." + end + end + step 'I see compared refs' do page.should have_content "Compare View" page.should have_content "Commits (1)" |