Commit 3e046733 authored by randx's avatar randx
Browse files

Added feature test for stats

parent 260ac6d74dd1
......@@ -16,9 +16,9 @@
%h4 Top 100 Committers:
%h4 Top 50 Committers:
- @stats.authors[0...100].each do |author|
- @stats.authors[0...50].each do |author|
= image_tag gravatar_icon(, 16), class: 'avatar s16'
......@@ -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
......@@ -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})
Then 'I see commits stats' do
page.should have_content 'Stats for master'
page.should have_content 'Committers'
page.should have_content 'Total commits'
......@@ -125,6 +125,10 @@ module SharedPaths
visit project_commits_path(@project, @project.root_ref + "/app/models/project.rb", {limit: 5})
Given 'I visit my project\'s commits stats page' do
visit stats_project_repository_path(@project)
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)
......@@ -29,7 +29,7 @@ def graph
def collect_authors
shortlog = repo.git.shortlog({:e => true, :s => true }, ref)
shortlog = repo.git.shortlog({e: true, s: true }, ref)
authors = []
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