summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-01-17 16:57:42 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-01-17 16:57:42 +0100
commitd9629a0cf03b80c8074b2ffa003d541193ca7097 (patch)
tree00efab91d3475c5f591ee50763c79dc83037c996
parent59ffe978fd5e89b55c737a030314a0bc3fdb85bd (diff)
downloadgitlab-ce-d9629a0cf03b80c8074b2ffa003d541193ca7097.tar.gz
Add specs for CI Lint button exposed on a builds page
-rw-r--r--features/project/builds/summary.feature10
-rw-r--r--features/steps/project/builds/summary.rb9
-rw-r--r--features/steps/shared/builds.rb6
3 files changed, 20 insertions, 5 deletions
diff --git a/features/project/builds/summary.feature b/features/project/builds/summary.feature
index e90ea592aab..9f006fcaca8 100644
--- a/features/project/builds/summary.feature
+++ b/features/project/builds/summary.feature
@@ -5,7 +5,11 @@ Feature: Project Builds Summary
And project has CI enabled
And project has a recent build
- Scenario: I browse build summary page
- When I visit recent build summary page
- Then I see summary for build
+ Scenario: I browse build details page
+ When I visit recent build details page
+ Then I see details of a build
And I see build trace
+
+ Scenario: I browse project builds page
+ When I visit project builds page
+ Then I see button to CI Lint Tool
diff --git a/features/steps/project/builds/summary.rb b/features/steps/project/builds/summary.rb
index 2439d48fbef..67986b958ec 100644
--- a/features/steps/project/builds/summary.rb
+++ b/features/steps/project/builds/summary.rb
@@ -4,11 +4,18 @@ class Spinach::Features::ProjectBuildsSummary < Spinach::FeatureSteps
include SharedBuilds
include RepoHelpers
- step 'I see summary for build' do
+ step 'I see details of a build' do
expect(page).to have_content "Build ##{@build.id}"
end
step 'I see build trace' do
expect(page).to have_css '#build-trace'
end
+
+ step 'I see button to CI Lint Tool' do
+ page.within('.controls') do
+ ci_lint_tool_link = page.find_link('CI Lint Tool')
+ expect(ci_lint_tool_link[:href]).to eq ci_lint_path
+ end
+ end
end
diff --git a/features/steps/shared/builds.rb b/features/steps/shared/builds.rb
index f88b01af84e..92bf362879b 100644
--- a/features/steps/shared/builds.rb
+++ b/features/steps/shared/builds.rb
@@ -10,10 +10,14 @@ module SharedBuilds
@build = create :ci_build, commit: ci_commit
end
- step 'I visit recent build summary page' do
+ step 'I visit recent build details page' do
visit namespace_project_build_path(@project.namespace, @project, @build)
end
+ step 'I visit project builds page' do
+ visit namespace_project_builds_path(@project.namespace, @project)
+ end
+
step 'recent build has artifacts available' do
artifacts = Rails.root + 'spec/fixtures/ci_build_artifacts.zip'
archive = fixture_file_upload(artifacts, 'application/zip')