Merge branch 'feature/expose-ci-lint-tool'

This commit is contained in:
Douwe Maan 2016-01-19 11:52:20 +01:00
commit f6e14431a0
6 changed files with 33 additions and 12 deletions

View file

@ -66,6 +66,7 @@ v 8.4.0 (unreleased)
- Add build artifacts browser
- Improve UX in builds artifacts browser
- Increase default size of `data` column in `events` table when using MySQL
- Expose button to CI Lint tool on project builds page
v 8.3.4
- Use gitlab-workhorse 0.5.4 (fixes API routing bug)

View file

@ -6,7 +6,12 @@
- if can?(current_user, :manage_builds, @project)
.pull-left.hidden-xs
- if @all_builds.running_or_pending.any?
= link_to 'Cancel running', cancel_all_namespace_project_builds_path(@project.namespace, @project), data: { confirm: 'Are you sure?' }, class: 'btn btn-danger', method: :post
= link_to 'Cancel running', cancel_all_namespace_project_builds_path(@project.namespace, @project),
data: { confirm: 'Are you sure?' }, class: 'btn btn-danger', method: :post
= link_to ci_lint_path, class: 'btn btn-default' do
= icon('wrench')
%span CI Lint
%ul.nav-links
%li{class: ('active' if @scope.nil?)}

View file

@ -7,21 +7,21 @@ Feature: Project Builds Artifacts
Scenario: I download build artifacts
Given recent build has artifacts available
When I visit recent build summary page
When I visit recent build details page
And I click artifacts download button
Then download of build artifacts archive starts
Scenario: I browse build artifacts
Given recent build has artifacts available
And recent build has artifacts metadata available
When I visit recent build summary page
When I visit recent build details page
And I click artifacts browse button
Then I should see content of artifacts archive
Scenario: I browse subdirectory of build artifacts
Given recent build has artifacts available
And recent build has artifacts metadata available
When I visit recent build summary page
When I visit recent build details page
And I click artifacts browse button
And I click link to subdirectory within build artifacts
Then I should see content of subdirectory within artifacts archive
@ -30,7 +30,7 @@ Feature: Project Builds Artifacts
Given recent build has artifacts available
And recent build has artifacts metadata available
And recent build artifacts contain directory with UTF-8 characters
When I visit recent build summary page
When I visit recent build details page
And I click artifacts browse button
And I navigate to directory with UTF-8 characters in name
Then I should see content of directory with UTF-8 characters in name
@ -39,7 +39,7 @@ Feature: Project Builds Artifacts
Given recent build has artifacts available
And recent build has artifacts metadata available
And recent build artifacts contain directory with invalid UTF-8 characters
When I visit recent build summary page
When I visit recent build details page
And I click artifacts browse button
And I navigate to parent directory of directory with invalid name
Then I should not see directory with invalid name on the list
@ -47,7 +47,7 @@ Feature: Project Builds Artifacts
Scenario: I download a single file from build artifacts
Given recent build has artifacts available
And recent build has artifacts metadata available
When I visit recent build summary page
When I visit recent build details page
And I click artifacts browse button
And I click a link to file within build artifacts
Then download of a file extracted from build artifacts should start

View file

@ -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

View file

@ -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' do
page.within('.controls') do
ci_lint_tool_link = page.find_link('CI Lint')
expect(ci_lint_tool_link[:href]).to eq ci_lint_path
end
end
end

View file

@ -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')