gitlab-org--gitlab-foss/features/steps/project/graph.rb
Zeger-Jan van de Weg a8efe4c469
Reword job to pipeline on the chart view
This got changed for i18n in !12480, however, I forgot to understand
that the meaning of the graphs changed in !12378. This corrects the
behaviour.
2017-08-24 10:44:59 +02:00

50 lines
1.5 KiB
Ruby

class Spinach::Features::ProjectGraph < Spinach::FeatureSteps
include SharedAuthentication
include SharedProject
step 'page should have graphs' do
expect(page).to have_selector ".stat-graph"
end
When 'I visit project "Shop" graph page' do
visit project_graph_path(project, "master")
end
step 'I visit project "Shop" commits graph page' do
visit commits_project_graph_path(project, "master")
end
step 'I visit project "Shop" languages graph page' do
visit languages_project_graph_path(project, "master")
end
step 'I visit project "Shop" chart page' do
visit charts_project_graph_path(project, "master")
end
step 'page should have languages graphs' do
expect(page).to have_content /Ruby 66.* %/
expect(page).to have_content /JavaScript 22.* %/
end
step 'page should have commits graphs' do
expect(page).to have_content "Commit statistics for master"
expect(page).to have_content "Commits per day of month"
end
step 'I visit project "Shop" CI graph page' do
visit ci_project_graph_path(project, 'master')
end
step 'page should have CI graphs' do
expect(page).to have_content 'Overall'
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'
expect(page).to have_content 'Commit duration in minutes for last 30 commits'
end
def project
@project ||= Project.find_by(name: "Shop")
end
end