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
|
2015-04-26 12:48:37 +05:30
|
|
|
visit namespace_project_graph_path(project.namespace, project, "master")
|
|
|
|
end
|
|
|
|
|
|
|
|
step 'I visit project "Shop" commits graph page' do
|
|
|
|
visit commits_namespace_project_graph_path(project.namespace, project, "master")
|
|
|
|
end
|
|
|
|
|
2015-12-23 02:04:40 +05:30
|
|
|
step 'I visit project "Shop" languages graph page' do
|
|
|
|
visit languages_namespace_project_graph_path(project.namespace, project, "master")
|
|
|
|
end
|
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
step 'I visit project "Shop" chart page' do
|
|
|
|
visit charts_namespace_project_graph_path(project.namespace, project, "master")
|
|
|
|
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
|
|
|
|
visit ci_namespace_project_graph_path(project.namespace, project, 'master')
|
|
|
|
end
|
|
|
|
|
|
|
|
step 'page should have CI graphs' do
|
|
|
|
expect(page).to have_content 'Overall'
|
2017-08-17 22:00:37 +05:30
|
|
|
expect(page).to have_content 'Jobs for last week'
|
|
|
|
expect(page).to have_content 'Jobs for last month'
|
|
|
|
expect(page).to have_content 'Jobs 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
|