summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorrandx <dmitriy.zaporozhets@gmail.com>2012-11-10 23:33:10 +0200
committerrandx <dmitriy.zaporozhets@gmail.com>2012-11-10 23:33:10 +0200
commit3e0467333471576735d225baec289c1e67e1a09c (patch)
tree3bb04b754264e384517e952650f3f616881d767d /features
parent1c5b2a5153abee3a140ce1f2926d746675addcf5 (diff)
downloadgitlab-ce-3e0467333471576735d225baec289c1e67e1a09c.tar.gz
Added feature test for stats
Diffstat (limited to 'features')
-rw-r--r--features/project/commits/commits.feature4
-rw-r--r--features/steps/project/project_browse_commits.rb6
-rw-r--r--features/steps/shared/paths.rb4
3 files changed, 14 insertions, 0 deletions
diff --git a/features/project/commits/commits.feature b/features/project/commits/commits.feature
index f5a11048b2a..56069cdc977 100644
--- a/features/project/commits/commits.feature
+++ b/features/project/commits/commits.feature
@@ -23,3 +23,7 @@ Feature: Project Browse commits
Scenario: I browse commits for a specific path
Given I visit my project's commits page for a specific path
Then I see breadcrumb links
+
+ Scenario: I browse commits stats
+ Given I visit my project's commits stats page
+ Then I see commits stats
diff --git a/features/steps/project/project_browse_commits.rb b/features/steps/project/project_browse_commits.rb
index 036b6297337..428c14a8052 100644
--- a/features/steps/project/project_browse_commits.rb
+++ b/features/steps/project/project_browse_commits.rb
@@ -51,4 +51,10 @@ class ProjectBrowseCommits < Spinach::FeatureSteps
find('ul.breadcrumb li:first a')['href'].should match(/#{@project.path}\/commits\/master\z/)
find('ul.breadcrumb li:last a')['href'].should match(%r{master/app/models/project\.rb\z})
end
+
+ Then 'I see commits stats' do
+ page.should have_content 'Stats for master'
+ page.should have_content 'Committers'
+ page.should have_content 'Total commits'
+ end
end
diff --git a/features/steps/shared/paths.rb b/features/steps/shared/paths.rb
index e24555543ee..33a94027472 100644
--- a/features/steps/shared/paths.rb
+++ b/features/steps/shared/paths.rb
@@ -125,6 +125,10 @@ module SharedPaths
visit project_commits_path(@project, @project.root_ref + "/app/models/project.rb", {limit: 5})
end
+ Given 'I visit my project\'s commits stats page' do
+ visit stats_project_repository_path(@project)
+ end
+
Given "I visit my project's network page" do
# Stub Graph::JsonBuilder max_size to speed up test (10 commits vs. 650)
Gitlab::Graph::JsonBuilder.stub(max_count: 10)