debian-mirror-gitlab/features/steps/project/graph.rb

47 lines
1.5 KiB
Ruby
Raw Normal View History

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
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'
2015-11-26 14:37:03 +05:30
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-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