Commit 487667e6 authored by Filipa Lacerda's avatar Filipa Lacerda

Merge branch 'master' into 27932-merge-request-pipelines-displays-json

* master:
  rspec_profiling: Discover the correct branch name in GitLab CI
  Updated protected branches dropdown image in docs
  Fix admin_labels_spec.rb transient failure
  Make sure our current .gitlab-ci.yml is valid
  Show Pipeline(not Job) in MR desktop notification
  Make min width smaller for user settings
parents ed4b3a82 01c2a50f
...@@ -272,7 +272,7 @@ header { ...@@ -272,7 +272,7 @@ header {
.header-user { .header-user {
.dropdown-menu-nav { .dropdown-menu-nav {
width: 140px; min-width: 140px;
margin-top: -5px; margin-top: -5px;
} }
} }
......
...@@ -16,13 +16,13 @@ ...@@ -16,13 +16,13 @@
gitlab_icon: "#{asset_path 'gitlab_logo.png'}", gitlab_icon: "#{asset_path 'gitlab_logo.png'}",
ci_status: "#{@merge_request.head_pipeline ? @merge_request.head_pipeline.status : ''}", ci_status: "#{@merge_request.head_pipeline ? @merge_request.head_pipeline.status : ''}",
ci_message: { ci_message: {
normal: "Job {{status}} for \"{{title}}\"", normal: "Pipeline {{status}} for \"{{title}}\"",
preparing: "{{status}} job for \"{{title}}\"" preparing: "{{status}} job for \"{{title}}\""
}, },
ci_enable: #{@project.ci_service ? "true" : "false"}, ci_enable: #{@project.ci_service ? "true" : "false"},
ci_title: { ci_title: {
preparing: "{{status}} job", preparing: "{{status}} job",
normal: "Job {{status}}" normal: "Pipeline {{status}}"
}, },
ci_sha: "#{@merge_request.head_pipeline ? @merge_request.head_pipeline.short_sha : ''}", ci_sha: "#{@merge_request.head_pipeline ? @merge_request.head_pipeline.short_sha : ''}",
ci_pipeline: #{@merge_request.head_pipeline.try(:id).to_json}, ci_pipeline: #{@merge_request.head_pipeline.try(:id).to_json},
......
---
title: Show Pipeline(not Job) in MR desktop notification
merge_request:
author:
...@@ -4,6 +4,12 @@ module RspecProfilingConnection ...@@ -4,6 +4,12 @@ module RspecProfilingConnection
end end
end end
module RspecProfilingGitBranchCi
def branch
ENV['CI_BUILD_REF_NAME'] || super
end
end
if Rails.env.test? if Rails.env.test?
RspecProfiling.configure do |config| RspecProfiling.configure do |config|
if ENV['RSPEC_PROFILING_POSTGRES_URL'] if ENV['RSPEC_PROFILING_POSTGRES_URL']
...@@ -11,4 +17,6 @@ if Rails.env.test? ...@@ -11,4 +17,6 @@ if Rails.env.test?
config.collector = RspecProfiling::Collectors::PSQL config.collector = RspecProfiling::Collectors::PSQL
end end
end end
RspecProfiling::VCS::Git.prepend(RspecProfilingGitBranchCi) if ENV.has_key?('CI')
end end
...@@ -35,15 +35,16 @@ RSpec.describe 'admin issues labels' do ...@@ -35,15 +35,16 @@ RSpec.describe 'admin issues labels' do
it 'deletes all labels', js: true do it 'deletes all labels', js: true do
page.within '.labels' do page.within '.labels' do
page.all('.btn-remove').each do |remove| page.all('.btn-remove').each do |remove|
wait_for_ajax
remove.click remove.click
wait_for_ajax
end end
end end
page.within '.manage-labels-list' do wait_for_ajax
expect(page).not_to have_content('bug')
expect(page).not_to have_content('feature_label') expect(page).to have_content("There are no labels yet")
end expect(page).not_to have_content('bug')
expect(page).not_to have_content('feature_label')
end end
end end
......
...@@ -4,6 +4,16 @@ module Ci ...@@ -4,6 +4,16 @@ module Ci
describe GitlabCiYamlProcessor, lib: true do describe GitlabCiYamlProcessor, lib: true do
let(:path) { 'path' } let(:path) { 'path' }
describe 'our current .gitlab-ci.yml' do
let(:config) { File.read("#{Rails.root}/.gitlab-ci.yml") }
it 'is valid' do
error_message = described_class.validation_message(config)
expect(error_message).to be_nil
end
end
describe '#build_attributes' do describe '#build_attributes' do
describe 'coverage entry' do describe 'coverage entry' do
subject { described_class.new(config, path).build_attributes(:rspec) } subject { described_class.new(config, path).build_attributes(:rspec) }
......
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