2014-09-22 14:30:25 +00:00
|
|
|
class Spinach::Features::ProjectGraph < Spinach::FeatureSteps
|
2013-06-05 12:50:11 +00:00
|
|
|
include SharedAuthentication
|
|
|
|
include SharedProject
|
|
|
|
|
2014-09-21 21:40:22 +00:00
|
|
|
step 'page should have graphs' do
|
2015-06-12 04:44:13 +00:00
|
|
|
expect(page).to have_selector ".stat-graph"
|
2013-06-05 12:50:11 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
When 'I visit project "Shop" graph page' do
|
2015-01-24 18:02:58 +00:00
|
|
|
visit namespace_project_graph_path(project.namespace, project, "master")
|
2013-06-05 12:50:11 +00:00
|
|
|
end
|
2014-09-29 09:11:53 +00:00
|
|
|
|
|
|
|
step 'I visit project "Shop" commits graph page' do
|
2015-01-24 18:02:58 +00:00
|
|
|
visit commits_namespace_project_graph_path(project.namespace, project, "master")
|
2014-09-29 09:11:53 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
step 'page should have commits graphs' do
|
2015-06-12 04:44:13 +00:00
|
|
|
expect(page).to have_content "Commit statistics for master"
|
|
|
|
expect(page).to have_content "Commits per day of month"
|
2014-09-29 09:11:53 +00:00
|
|
|
end
|
2015-09-23 14:16:45 +00: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'
|
|
|
|
expect(page).to have_content 'Builds chart for last week'
|
|
|
|
expect(page).to have_content 'Builds chart for last month'
|
|
|
|
expect(page).to have_content 'Builds chart for last year'
|
|
|
|
expect(page).to have_content 'Commit duration in minutes for last 30 commits'
|
|
|
|
end
|
|
|
|
|
|
|
|
def project
|
2015-10-04 00:59:54 +00:00
|
|
|
@project ||= Project.find_by(name: "Shop")
|
2015-09-23 14:16:45 +00:00
|
|
|
end
|
2013-06-05 12:50:11 +00:00
|
|
|
end
|