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
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_graph_path(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
|
2017-06-29 13:06:35 -04:00
|
|
|
visit commits_project_graph_path(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
|
2017-06-29 13:06:35 -04:00
|
|
|
visit languages_project_graph_path(project, "master")
|
2015-12-07 20:38:59 -05:00
|
|
|
end
|
|
|
|
|
2017-03-02 12:57:01 -05:00
|
|
|
step 'I visit project "Shop" chart page' do
|
2017-06-29 13:06:35 -04:00
|
|
|
visit charts_project_graph_path(project, "master")
|
2017-03-02 12:57:01 -05:00
|
|
|
end
|
|
|
|
|
2015-12-07 20:38:59 -05:00
|
|
|
step 'page should have languages graphs' do
|
2016-10-14 20:07:38 -04:00
|
|
|
expect(page).to have_content /Ruby 66.* %/
|
|
|
|
expect(page).to have_content /JavaScript 22.* %/
|
2015-12-07 20:38:59 -05:00
|
|
|
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
|
2017-06-29 13:06:35 -04:00
|
|
|
visit ci_project_graph_path(project, 'master')
|
2015-09-23 10:16:45 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
step 'page should have CI graphs' do
|
|
|
|
expect(page).to have_content 'Overall'
|
2017-08-24 03:19:49 -04:00
|
|
|
expect(page).to have_content 'Pipelines for last week'
|
|
|
|
expect(page).to have_content 'Pipelines for last month'
|
|
|
|
expect(page).to have_content 'Pipelines 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
|