summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2016-01-19 11:52:20 +0100
committerDouwe Maan <douwe@gitlab.com>2016-01-19 11:52:20 +0100
commitf6e14431a0676708590ddb7cb7567e1f7e97c244 (patch)
tree9d165aa401d1e1bab4ab7ce3754cff684d46875e
parente9c3d0424f145e994ffc2be91b0e2adbf58fa3c2 (diff)
parent6fe33804dc080522242d9ea3639548c2b246a56b (diff)
downloadgitlab-ce-f6e14431a0676708590ddb7cb7567e1f7e97c244.tar.gz
Merge branch 'feature/expose-ci-lint-tool'
-rw-r--r--CHANGELOG1
-rw-r--r--app/views/projects/builds/index.html.haml7
-rw-r--r--features/project/builds/artifacts.feature12
-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
6 files changed, 33 insertions, 12 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 9d58f5cea59..207ddf1dd64 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -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)
diff --git a/app/views/projects/builds/index.html.haml b/app/views/projects/builds/index.html.haml
index 5d18c0d803a..bbb6944a65a 100644
--- a/app/views/projects/builds/index.html.haml
+++ b/app/views/projects/builds/index.html.haml
@@ -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?)}
diff --git a/features/project/builds/artifacts.feature b/features/project/builds/artifacts.feature
index 4f68e44fd77..1185854453a 100644
--- a/features/project/builds/artifacts.feature
+++ b/features/project/builds/artifacts.feature
@@ -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
diff --git a/features/project/builds/summary.feature b/features/project/builds/summary.feature
index e90ea592aab..b69d279517b 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
diff --git a/features/steps/project/builds/summary.rb b/features/steps/project/builds/summary.rb
index 2439d48fbef..036bc0a499e 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' 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
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')