2015-04-26 12:48:37 +05:30
|
|
|
class Spinach::Features::ProjectGraph < Spinach::FeatureSteps
|
2014-09-02 18:07:02 +05:30
|
|
|
include SharedAuthentication
|
|
|
|
include SharedProject
|
|
|
|
|
2015-04-26 12:48:37 +05:30
|
|
|
step 'page should have graphs' do
|
2015-09-11 14:41:01 +05:30
|
|
|
expect(page).to have_selector ".stat-graph"
|
2014-09-02 18:07:02 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
When 'I visit project "Shop" graph page' do
|
2017-09-10 17:25:29 +05:30
|
|
|
visit project_graph_path(project, "master")
|
2015-04-26 12:48:37 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
step 'I visit project "Shop" commits graph page' do
|
2017-09-10 17:25:29 +05:30
|
|
|
visit commits_project_graph_path(project, "master")
|
2015-04-26 12:48:37 +05:30
|
|
|
end
|
|
|
|
|
2015-12-23 02:04:40 +05:30
|
|
|
step 'I visit project "Shop" languages graph page' do
|
2017-09-10 17:25:29 +05:30
|
|
|
visit languages_project_graph_path(project, "master")
|
2015-12-23 02:04:40 +05:30
|
|
|
end
|
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
step 'I visit project "Shop" chart page' do
|
2017-09-10 17:25:29 +05:30
|
|
|
visit charts_project_graph_path(project, "master")
|
2017-08-17 22:00:37 +05:30
|
|
|
end
|
|
|
|
|
2015-12-23 02:04:40 +05:30
|
|
|
step 'page should have languages graphs' do
|
2016-11-03 12:29:30 +05:30
|
|
|
expect(page).to have_content /Ruby 66.* %/
|
|
|
|
expect(page).to have_content /JavaScript 22.* %/
|
2015-12-23 02:04:40 +05:30
|
|
|
end
|
|
|
|
|
2015-04-26 12:48:37 +05:30
|
|
|
step 'page should have commits graphs' do
|
2015-09-11 14:41:01 +05:30
|
|
|
expect(page).to have_content "Commit statistics for master"
|
|
|
|
expect(page).to have_content "Commits per day of month"
|
2014-09-02 18:07:02 +05:30
|
|
|
end
|
2015-10-24 18:46:33 +05:30
|
|
|
|
|
|
|
step 'I visit project "Shop" CI graph page' do
|
2017-09-10 17:25:29 +05:30
|
|
|
visit ci_project_graph_path(project, 'master')
|
2015-10-24 18:46:33 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
step 'page should have CI graphs' do
|
|
|
|
expect(page).to have_content 'Overall'
|
2018-03-17 18:26:18 +05:30
|
|
|
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-10-24 18:46:33 +05:30
|
|
|
expect(page).to have_content 'Commit duration in minutes for last 30 commits'
|
|
|
|
end
|
|
|
|
|
|
|
|
def project
|
|
|
|
@project ||= Project.find_by(name: "Shop")
|
|
|
|
end
|
2014-09-02 18:07:02 +05:30
|
|
|
end
|