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 {
.header-user {
.dropdown-menu-nav {
width: 140px;
min-width: 140px;
margin-top: -5px;
}
}
......
......@@ -16,13 +16,13 @@
gitlab_icon: "#{asset_path 'gitlab_logo.png'}",
ci_status: "#{@merge_request.head_pipeline ? @merge_request.head_pipeline.status : ''}",
ci_message: {
normal: "Job {{status}} for \"{{title}}\"",
normal: "Pipeline {{status}} for \"{{title}}\"",
preparing: "{{status}} job for \"{{title}}\""
},
ci_enable: #{@project.ci_service ? "true" : "false"},
ci_title: {
preparing: "{{status}} job",
normal: "Job {{status}}"
normal: "Pipeline {{status}}"
},
ci_sha: "#{@merge_request.head_pipeline ? @merge_request.head_pipeline.short_sha : ''}",
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
end
end
module RspecProfilingGitBranchCi
def branch
ENV['CI_BUILD_REF_NAME'] || super
end
end
if Rails.env.test?
RspecProfiling.configure do |config|
if ENV['RSPEC_PROFILING_POSTGRES_URL']
......@@ -11,4 +17,6 @@ if Rails.env.test?
config.collector = RspecProfiling::Collectors::PSQL
end
end
RspecProfiling::VCS::Git.prepend(RspecProfilingGitBranchCi) if ENV.has_key?('CI')
end
......@@ -35,15 +35,16 @@ RSpec.describe 'admin issues labels' do
it 'deletes all labels', js: true do
page.within '.labels' do
page.all('.btn-remove').each do |remove|
wait_for_ajax
remove.click
wait_for_ajax
end
end
page.within '.manage-labels-list' do
expect(page).not_to have_content('bug')
expect(page).not_to have_content('feature_label')
end
wait_for_ajax
expect(page).to have_content("There are no labels yet")
expect(page).not_to have_content('bug')
expect(page).not_to have_content('feature_label')
end
end
......
......@@ -4,6 +4,16 @@ module Ci
describe GitlabCiYamlProcessor, lib: true do
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 'coverage entry' do
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