2014-09-22 10:30:25 -04:00
|
|
|
class Spinach::Features::ProjectGraph < Spinach::FeatureSteps
|
2013-06-05 08:50:11 -04:00
|
|
|
include SharedAuthentication
|
|
|
|
include SharedProject
|
|
|
|
|
2014-09-21 17:40:22 -04:00
|
|
|
step 'page should have graphs' do
|
2015-06-12 00:44:13 -04:00
|
|
|
expect(page).to have_selector ".stat-graph"
|
2013-06-05 08:50:11 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
When 'I visit project "Shop" graph page' do
|
2015-01-24 13:02:58 -05:00
|
|
|
visit namespace_project_graph_path(project.namespace, project, "master")
|
2013-06-05 08:50:11 -04:00
|
|
|
end
|
2014-09-29 05:11:53 -04:00
|
|
|
|
|
|
|
step 'I visit project "Shop" commits graph page' do
|
2015-01-24 13:02:58 -05:00
|
|
|
visit commits_namespace_project_graph_path(project.namespace, project, "master")
|
2014-09-29 05:11:53 -04:00
|
|
|
end
|
|
|
|
|
2015-12-07 20:38:59 -05:00
|
|
|
step 'I visit project "Shop" languages graph page' do
|
|
|
|
visit languages_namespace_project_graph_path(project.namespace, project, "master")
|
|
|
|
end
|
|
|
|
|
|
|
|
step 'page should have languages graphs' do
|
|
|
|
expect(page).to have_content "Ruby 66.63 %"
|
|
|
|
expect(page).to have_content "JavaScript 22.96 %"
|
|
|
|
end
|
|
|
|
|
2014-09-29 05:11:53 -04:00
|
|
|
step 'page should have commits graphs' do
|
2015-06-12 00:44:13 -04:00
|
|
|
expect(page).to have_content "Commit statistics for master"
|
|
|
|
expect(page).to have_content "Commits per day of month"
|
2014-09-29 05:11:53 -04:00
|
|
|
end
|
2015-09-23 10:16:45 -04:00
|
|
|
|
|
|
|
step 'I visit project "Shop" CI graph page' do
|
|
|
|
visit ci_namespace_project_graph_path(project.namespace, project, 'master')
|
|
|
|
end
|
|
|
|
|
|
|
|
step 'page should have CI graphs' do
|
|
|
|
expect(page).to have_content 'Overall'
|
2015-11-10 10:27:50 -05:00
|
|
|
expect(page).to have_content 'Builds for last week'
|
|
|
|
expect(page).to have_content 'Builds for last month'
|
|
|
|
expect(page).to have_content 'Builds for last year'
|
2015-09-23 10:16:45 -04:00
|
|
|
expect(page).to have_content 'Commit duration in minutes for last 30 commits'
|
|
|
|
end
|
|
|
|
|
|
|
|
def project
|
2015-10-03 20:59:54 -04:00
|
|
|
@project ||= Project.find_by(name: "Shop")
|
2015-09-23 10:16:45 -04:00
|
|
|
end
|
2013-06-05 08:50:11 -04:00
|
|
|
end
|