summaryrefslogtreecommitdiff
path: root/features/steps/project/graph.rb
diff options
context:
space:
mode:
Diffstat (limited to 'features/steps/project/graph.rb')
-rw-r--r--features/steps/project/graph.rb22
1 files changed, 20 insertions, 2 deletions
diff --git a/features/steps/project/graph.rb b/features/steps/project/graph.rb
index 5e7e573a6ab..9f9d099961d 100644
--- a/features/steps/project/graph.rb
+++ b/features/steps/project/graph.rb
@@ -7,12 +7,10 @@ class Spinach::Features::ProjectGraph < Spinach::FeatureSteps
end
When 'I visit project "Shop" graph page' do
- project = Project.find_by(name: "Shop")
visit namespace_project_graph_path(project.namespace, project, "master")
end
step 'I visit project "Shop" commits graph page' do
- project = Project.find_by(name: "Shop")
visit commits_namespace_project_graph_path(project.namespace, project, "master")
end
@@ -20,4 +18,24 @@ class Spinach::Features::ProjectGraph < Spinach::FeatureSteps
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_namespace_project_graph_path(project.namespace, project, 'master')
+ end
+
+ step 'project "Shop" has CI enabled' do
+ project.enable_ci(@user)
+ end
+
+ step 'page should have CI graphs' do
+ expect(page).to have_content 'Overall'
+ expect(page).to have_content 'Builds chart for last week'
+ expect(page).to have_content 'Builds chart for last month'
+ expect(page).to have_content 'Builds chart 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