Commit d9629a0c authored by Grzegorz Bizon's avatar Grzegorz Bizon

Add specs for CI Lint button exposed on a builds page

parent 59ffe978
...@@ -5,7 +5,11 @@ Feature: Project Builds Summary ...@@ -5,7 +5,11 @@ Feature: Project Builds Summary
And project has CI enabled And project has CI enabled
And project has a recent build And project has a recent build
Scenario: I browse build summary page Scenario: I browse build details page
When I visit recent build summary page When I visit recent build details page
Then I see summary for build Then I see details of a build
And I see build trace 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
...@@ -4,11 +4,18 @@ class Spinach::Features::ProjectBuildsSummary < Spinach::FeatureSteps ...@@ -4,11 +4,18 @@ class Spinach::Features::ProjectBuildsSummary < Spinach::FeatureSteps
include SharedBuilds include SharedBuilds
include RepoHelpers 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}" expect(page).to have_content "Build ##{@build.id}"
end end
step 'I see build trace' do step 'I see build trace' do
expect(page).to have_css '#build-trace' expect(page).to have_css '#build-trace'
end 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 end
...@@ -10,10 +10,14 @@ module SharedBuilds ...@@ -10,10 +10,14 @@ module SharedBuilds
@build = create :ci_build, commit: ci_commit @build = create :ci_build, commit: ci_commit
end 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) visit namespace_project_build_path(@project.namespace, @project, @build)
end end
step 'I visit project builds page' do
visit namespace_project_builds_path(@project.namespace, @project)
end
step 'recent build has artifacts available' do step 'recent build has artifacts available' do
artifacts = Rails.root + 'spec/fixtures/ci_build_artifacts.zip' artifacts = Rails.root + 'spec/fixtures/ci_build_artifacts.zip'
archive = fixture_file_upload(artifacts, 'application/zip') archive = fixture_file_upload(artifacts, 'application/zip')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment