remove all .ico favicon variations, use png always
the ci status icons are generated client side, wo we don't need the static files anymore.
Before Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 864 B After Width: | Height: | Size: 864 B |
Before Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 889 B After Width: | Height: | Size: 889 B |
Before Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 1,015 B After Width: | Height: | Size: 1,015 B |
Before Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 1 KiB |
Before Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 945 B After Width: | Height: | Size: 945 B |
Before Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 919 B After Width: | Height: | Size: 919 B |
Before Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 923 B After Width: | Height: | Size: 923 B |
Before Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 1 KiB |
Before Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 830 B After Width: | Height: | Size: 830 B |
BIN
app/assets/images/favicon-blue.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 5.3 KiB |
BIN
app/assets/images/favicon-yellow.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 5.3 KiB |
BIN
app/assets/images/favicon.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
|
@ -4,7 +4,7 @@ export default class FaviconAdmin {
|
||||||
constructor() {
|
constructor() {
|
||||||
const faviconContainer = $('.js-favicons');
|
const faviconContainer = $('.js-favicons');
|
||||||
const faviconUrl = faviconContainer.data('favicon');
|
const faviconUrl = faviconContainer.data('favicon');
|
||||||
const overlayUrls = faviconContainer.data('status-overlays');
|
const overlayUrls = faviconContainer.data('status-overlays') || [];
|
||||||
|
|
||||||
overlayUrls.forEach((statusOverlay) => {
|
overlayUrls.forEach((statusOverlay) => {
|
||||||
createOverlayIcon(faviconUrl, statusOverlay).then((faviconWithOverlayUrl) => {
|
createOverlayIcon(faviconUrl, statusOverlay).then((faviconWithOverlayUrl) => {
|
||||||
|
|
|
@ -513,7 +513,7 @@ const fileNameIcons = {
|
||||||
'credits.md': 'credits',
|
'credits.md': 'credits',
|
||||||
'credits.md.rendered': 'credits',
|
'credits.md.rendered': 'credits',
|
||||||
'.flowconfig': 'flow',
|
'.flowconfig': 'flow',
|
||||||
'favicon.ico': 'favicon',
|
'favicon.png': 'favicon',
|
||||||
'karma.conf.js': 'karma',
|
'karma.conf.js': 'karma',
|
||||||
'karma.conf.ts': 'karma',
|
'karma.conf.ts': 'karma',
|
||||||
'karma.conf.coffee': 'karma',
|
'karma.conf.coffee': 'karma',
|
||||||
|
|
|
@ -265,7 +265,7 @@ class JiraService < IssueTrackerService
|
||||||
title: title,
|
title: title,
|
||||||
status: status,
|
status: status,
|
||||||
icon: {
|
icon: {
|
||||||
title: 'GitLab', url16x16: asset_url('favicon.ico', host: gitlab_config.url)
|
title: 'GitLab', url16x16: asset_url('favicon.png', host: gitlab_config.url)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,7 +58,7 @@ Currently the following names are reserved as top level groups:
|
||||||
- dashboard
|
- dashboard
|
||||||
- deploy.html
|
- deploy.html
|
||||||
- explore
|
- explore
|
||||||
- favicon.ico
|
- favicon.png
|
||||||
- groups
|
- groups
|
||||||
- header_logo_dark.png
|
- header_logo_dark.png
|
||||||
- header_logo_light.png
|
- header_logo_light.png
|
||||||
|
|
|
@ -3,16 +3,15 @@ module Gitlab
|
||||||
class << self
|
class << self
|
||||||
def main
|
def main
|
||||||
return custom_favicon_url(appearance_favicon.favicon_main.url) if appearance_favicon.exists?
|
return custom_favicon_url(appearance_favicon.favicon_main.url) if appearance_favicon.exists?
|
||||||
return 'favicon-yellow.ico' if Gitlab::Utils.to_boolean(ENV['CANARY'])
|
return ActionController::Base.helpers.image_path('favicon-yellow.png') if Gitlab::Utils.to_boolean(ENV['CANARY'])
|
||||||
return 'favicon-blue.ico' if Rails.env.development?
|
return ActionController::Base.helpers.image_path('favicon-blue.png') if Rails.env.development?
|
||||||
|
|
||||||
'favicon.ico'
|
ActionController::Base.helpers.image_path('favicon.png')
|
||||||
end
|
end
|
||||||
|
|
||||||
def status_overlay(status_name)
|
def status_overlay(status_name)
|
||||||
path = File.join(
|
path = File.join(
|
||||||
'ci_favicons',
|
'ci_favicons',
|
||||||
'overlays',
|
|
||||||
"#{status_name}.png"
|
"#{status_name}.png"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -27,7 +26,7 @@ module Gitlab
|
||||||
|
|
||||||
def available_status_names
|
def available_status_names
|
||||||
@available_status_names ||= begin
|
@available_status_names ||= begin
|
||||||
Dir.glob(Rails.root.join('app', 'assets', 'images', 'ci_favicons', 'overlays', "*.png"))
|
Dir.glob(Rails.root.join('app', 'assets', 'images', 'ci_favicons', '*.png'))
|
||||||
.map { |file| File.basename(file, '.png') }
|
.map { |file| File.basename(file, '.png') }
|
||||||
.sort
|
.sort
|
||||||
end
|
end
|
||||||
|
|
|
@ -30,7 +30,7 @@ module Gitlab
|
||||||
dashboard
|
dashboard
|
||||||
deploy.html
|
deploy.html
|
||||||
explore
|
explore
|
||||||
favicon.ico
|
favicon.png
|
||||||
files
|
files
|
||||||
groups
|
groups
|
||||||
health_check
|
health_check
|
||||||
|
|
Before Width: | Height: | Size: 5.3 KiB |
BIN
public/favicon.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
|
@ -265,7 +265,7 @@ describe Projects::JobsController, :clean_gitlab_redis_shared_state do
|
||||||
expect(json_response['text']).to eq status.text
|
expect(json_response['text']).to eq status.text
|
||||||
expect(json_response['label']).to eq status.label
|
expect(json_response['label']).to eq status.label
|
||||||
expect(json_response['icon']).to eq status.icon
|
expect(json_response['icon']).to eq status.icon
|
||||||
expect(json_response['favicon']).to match_asset_path "/assets/ci_favicons/#{status.favicon}.ico"
|
expect(json_response['favicon']).to match_asset_path "/assets/ci_favicons/#{status.favicon}.png"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -681,7 +681,7 @@ describe Projects::MergeRequestsController do
|
||||||
expect(json_response['text']).to eq status.text
|
expect(json_response['text']).to eq status.text
|
||||||
expect(json_response['label']).to eq status.label
|
expect(json_response['label']).to eq status.label
|
||||||
expect(json_response['icon']).to eq status.icon
|
expect(json_response['icon']).to eq status.icon
|
||||||
expect(json_response['favicon']).to match_asset_path "/assets/ci_favicons/#{status.favicon}.ico"
|
expect(json_response['favicon']).to match_asset_path "/assets/ci_favicons/#{status.favicon}.png"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -190,7 +190,7 @@ describe Projects::PipelinesController do
|
||||||
expect(json_response['text']).to eq status.text
|
expect(json_response['text']).to eq status.text
|
||||||
expect(json_response['label']).to eq status.label
|
expect(json_response['label']).to eq status.label
|
||||||
expect(json_response['icon']).to eq status.icon
|
expect(json_response['icon']).to eq status.icon
|
||||||
expect(json_response['favicon']).to match_asset_path("/assets/ci_favicons/#{status.favicon}.ico")
|
expect(json_response['favicon']).to match_asset_path("/assets/ci_favicons/#{status.favicon}.png")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ feature 'Merge request > User creates image diff notes', :js do
|
||||||
# Stub helper to return any blob file as image from public app folder.
|
# Stub helper to return any blob file as image from public app folder.
|
||||||
# This is necessary to run this specs since we don't display repo images in capybara.
|
# This is necessary to run this specs since we don't display repo images in capybara.
|
||||||
allow_any_instance_of(DiffHelper).to receive(:diff_file_blob_raw_url).and_return('/apple-touch-icon.png')
|
allow_any_instance_of(DiffHelper).to receive(:diff_file_blob_raw_url).and_return('/apple-touch-icon.png')
|
||||||
allow_any_instance_of(DiffHelper).to receive(:diff_file_old_blob_raw_url).and_return('/favicon.ico')
|
allow_any_instance_of(DiffHelper).to receive(:diff_file_old_blob_raw_url).and_return('/favicon.png')
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'create commit diff notes' do
|
context 'create commit diff notes' do
|
||||||
|
|
|
@ -20,7 +20,7 @@ export default {
|
||||||
group: 'success',
|
group: 'success',
|
||||||
has_details: true,
|
has_details: true,
|
||||||
details_path: '/root/ci-mock/-/jobs/4757',
|
details_path: '/root/ci-mock/-/jobs/4757',
|
||||||
favicon: '/assets/ci_favicons/dev/favicon_status_success-308b4fc054cdd1b68d0865e6cfb7b02e92e3472f201507418f8eddb74ac11a59.ico',
|
favicon: '/assets/ci_favicons/favicon_status_success-308b4fc054cdd1b68d0865e6cfb7b02e92e3472f201507418f8eddb74ac11a59.png',
|
||||||
action: {
|
action: {
|
||||||
icon: 'retry',
|
icon: 'retry',
|
||||||
title: 'Retry',
|
title: 'Retry',
|
||||||
|
@ -78,7 +78,7 @@ export default {
|
||||||
group: 'success',
|
group: 'success',
|
||||||
has_details: true,
|
has_details: true,
|
||||||
details_path: '/root/ci-mock/pipelines/140',
|
details_path: '/root/ci-mock/pipelines/140',
|
||||||
favicon: '/assets/ci_favicons/dev/favicon_status_success-308b4fc054cdd1b68d0865e6cfb7b02e92e3472f201507418f8eddb74ac11a59.ico',
|
favicon: '/assets/ci_favicons/favicon_status_success-308b4fc054cdd1b68d0865e6cfb7b02e92e3472f201507418f8eddb74ac11a59.png',
|
||||||
},
|
},
|
||||||
duration: 6,
|
duration: 6,
|
||||||
finished_at: '2017-06-01T17:32:00.042Z',
|
finished_at: '2017-06-01T17:32:00.042Z',
|
||||||
|
|
|
@ -20,7 +20,7 @@ export default {
|
||||||
has_details: true,
|
has_details: true,
|
||||||
details_path: '/root/ci-mock/pipelines/123',
|
details_path: '/root/ci-mock/pipelines/123',
|
||||||
favicon:
|
favicon:
|
||||||
'/assets/ci_favicons/dev/favicon_status_success-308b4fc054cdd1b68d0865e6cfb7b02e92e3472f201507418f8eddb74ac11a59.ico',
|
'/assets/ci_favicons/favicon_status_success-308b4fc054cdd1b68d0865e6cfb7b02e92e3472f201507418f8eddb74ac11a59.png',
|
||||||
},
|
},
|
||||||
duration: 9,
|
duration: 9,
|
||||||
finished_at: '2017-04-19T14:30:27.542Z',
|
finished_at: '2017-04-19T14:30:27.542Z',
|
||||||
|
@ -40,7 +40,7 @@ export default {
|
||||||
has_details: true,
|
has_details: true,
|
||||||
details_path: '/root/ci-mock/builds/4153',
|
details_path: '/root/ci-mock/builds/4153',
|
||||||
favicon:
|
favicon:
|
||||||
'/assets/ci_favicons/dev/favicon_status_success-308b4fc054cdd1b68d0865e6cfb7b02e92e3472f201507418f8eddb74ac11a59.ico',
|
'/assets/ci_favicons/favicon_status_success-308b4fc054cdd1b68d0865e6cfb7b02e92e3472f201507418f8eddb74ac11a59.png',
|
||||||
action: {
|
action: {
|
||||||
icon: 'retry',
|
icon: 'retry',
|
||||||
title: 'Retry',
|
title: 'Retry',
|
||||||
|
@ -65,7 +65,7 @@ export default {
|
||||||
has_details: true,
|
has_details: true,
|
||||||
details_path: '/root/ci-mock/builds/4153',
|
details_path: '/root/ci-mock/builds/4153',
|
||||||
favicon:
|
favicon:
|
||||||
'/assets/ci_favicons/dev/favicon_status_success-308b4fc054cdd1b68d0865e6cfb7b02e92e3472f201507418f8eddb74ac11a59.ico',
|
'/assets/ci_favicons/favicon_status_success-308b4fc054cdd1b68d0865e6cfb7b02e92e3472f201507418f8eddb74ac11a59.png',
|
||||||
action: {
|
action: {
|
||||||
icon: 'retry',
|
icon: 'retry',
|
||||||
title: 'Retry',
|
title: 'Retry',
|
||||||
|
@ -85,7 +85,7 @@ export default {
|
||||||
has_details: true,
|
has_details: true,
|
||||||
details_path: '/root/ci-mock/pipelines/123#test',
|
details_path: '/root/ci-mock/pipelines/123#test',
|
||||||
favicon:
|
favicon:
|
||||||
'/assets/ci_favicons/dev/favicon_status_success-308b4fc054cdd1b68d0865e6cfb7b02e92e3472f201507418f8eddb74ac11a59.ico',
|
'/assets/ci_favicons/favicon_status_success-308b4fc054cdd1b68d0865e6cfb7b02e92e3472f201507418f8eddb74ac11a59.png',
|
||||||
},
|
},
|
||||||
path: '/root/ci-mock/pipelines/123#test',
|
path: '/root/ci-mock/pipelines/123#test',
|
||||||
dropdown_path: '/root/ci-mock/pipelines/123/stage.json?stage=test',
|
dropdown_path: '/root/ci-mock/pipelines/123/stage.json?stage=test',
|
||||||
|
@ -105,7 +105,7 @@ export default {
|
||||||
has_details: true,
|
has_details: true,
|
||||||
details_path: '/root/ci-mock/builds/4166',
|
details_path: '/root/ci-mock/builds/4166',
|
||||||
favicon:
|
favicon:
|
||||||
'/assets/ci_favicons/dev/favicon_status_success-308b4fc054cdd1b68d0865e6cfb7b02e92e3472f201507418f8eddb74ac11a59.ico',
|
'/assets/ci_favicons/favicon_status_success-308b4fc054cdd1b68d0865e6cfb7b02e92e3472f201507418f8eddb74ac11a59.png',
|
||||||
action: {
|
action: {
|
||||||
icon: 'retry',
|
icon: 'retry',
|
||||||
title: 'Retry',
|
title: 'Retry',
|
||||||
|
@ -130,7 +130,7 @@ export default {
|
||||||
has_details: true,
|
has_details: true,
|
||||||
details_path: '/root/ci-mock/builds/4166',
|
details_path: '/root/ci-mock/builds/4166',
|
||||||
favicon:
|
favicon:
|
||||||
'/assets/ci_favicons/dev/favicon_status_success-308b4fc054cdd1b68d0865e6cfb7b02e92e3472f201507418f8eddb74ac11a59.ico',
|
'/assets/ci_favicons/favicon_status_success-308b4fc054cdd1b68d0865e6cfb7b02e92e3472f201507418f8eddb74ac11a59.png',
|
||||||
action: {
|
action: {
|
||||||
icon: 'retry',
|
icon: 'retry',
|
||||||
title: 'Retry',
|
title: 'Retry',
|
||||||
|
@ -152,7 +152,7 @@ export default {
|
||||||
has_details: true,
|
has_details: true,
|
||||||
details_path: '/root/ci-mock/builds/4159',
|
details_path: '/root/ci-mock/builds/4159',
|
||||||
favicon:
|
favicon:
|
||||||
'/assets/ci_favicons/dev/favicon_status_success-308b4fc054cdd1b68d0865e6cfb7b02e92e3472f201507418f8eddb74ac11a59.ico',
|
'/assets/ci_favicons/favicon_status_success-308b4fc054cdd1b68d0865e6cfb7b02e92e3472f201507418f8eddb74ac11a59.png',
|
||||||
action: {
|
action: {
|
||||||
icon: 'retry',
|
icon: 'retry',
|
||||||
title: 'Retry',
|
title: 'Retry',
|
||||||
|
@ -177,7 +177,7 @@ export default {
|
||||||
has_details: true,
|
has_details: true,
|
||||||
details_path: '/root/ci-mock/builds/4159',
|
details_path: '/root/ci-mock/builds/4159',
|
||||||
favicon:
|
favicon:
|
||||||
'/assets/ci_favicons/dev/favicon_status_success-308b4fc054cdd1b68d0865e6cfb7b02e92e3472f201507418f8eddb74ac11a59.ico',
|
'/assets/ci_favicons/favicon_status_success-308b4fc054cdd1b68d0865e6cfb7b02e92e3472f201507418f8eddb74ac11a59.png',
|
||||||
action: {
|
action: {
|
||||||
icon: 'retry',
|
icon: 'retry',
|
||||||
title: 'Retry',
|
title: 'Retry',
|
||||||
|
@ -197,7 +197,7 @@ export default {
|
||||||
has_details: true,
|
has_details: true,
|
||||||
details_path: '/root/ci-mock/pipelines/123#deploy',
|
details_path: '/root/ci-mock/pipelines/123#deploy',
|
||||||
favicon:
|
favicon:
|
||||||
'/assets/ci_favicons/dev/favicon_status_success-308b4fc054cdd1b68d0865e6cfb7b02e92e3472f201507418f8eddb74ac11a59.ico',
|
'/assets/ci_favicons/favicon_status_success-308b4fc054cdd1b68d0865e6cfb7b02e92e3472f201507418f8eddb74ac11a59.png',
|
||||||
},
|
},
|
||||||
path: '/root/ci-mock/pipelines/123#deploy',
|
path: '/root/ci-mock/pipelines/123#deploy',
|
||||||
dropdown_path: '/root/ci-mock/pipelines/123/stage.json?stage=deploy',
|
dropdown_path: '/root/ci-mock/pipelines/123/stage.json?stage=deploy',
|
||||||
|
|
|
@ -2,19 +2,19 @@ require 'rails_helper'
|
||||||
|
|
||||||
RSpec.describe Gitlab::Favicon, :request_store do
|
RSpec.describe Gitlab::Favicon, :request_store do
|
||||||
describe '.main' do
|
describe '.main' do
|
||||||
it 'defaults to favicon.ico' do
|
it 'defaults to favicon.png' do
|
||||||
allow(Rails).to receive(:env).and_return(ActiveSupport::StringInquirer.new('production'))
|
allow(Rails).to receive(:env).and_return(ActiveSupport::StringInquirer.new('production'))
|
||||||
expect(described_class.main).to eq 'favicon.ico'
|
expect(described_class.main).to match_asset_path '/assets/favicon.png'
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'has blue favicon for development' do
|
it 'has blue favicon for development' do
|
||||||
allow(Rails).to receive(:env).and_return(ActiveSupport::StringInquirer.new('development'))
|
allow(Rails).to receive(:env).and_return(ActiveSupport::StringInquirer.new('development'))
|
||||||
expect(described_class.main).to eq 'favicon-blue.ico'
|
expect(described_class.main).to match_asset_path '/assets/favicon-blue.png'
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'has yellow favicon for canary' do
|
it 'has yellow favicon for canary' do
|
||||||
stub_env('CANARY', 'true')
|
stub_env('CANARY', 'true')
|
||||||
expect(described_class.main).to eq 'favicon-yellow.ico'
|
expect(described_class.main).to match_asset_path 'favicon-yellow.png'
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'uses the custom favicon if a favicon appearance is present' do
|
it 'uses the custom favicon if a favicon appearance is present' do
|
||||||
|
@ -27,7 +27,7 @@ RSpec.describe Gitlab::Favicon, :request_store do
|
||||||
subject { described_class.status_overlay('favicon_status_created') }
|
subject { described_class.status_overlay('favicon_status_created') }
|
||||||
|
|
||||||
it 'returns the overlay for the status' do
|
it 'returns the overlay for the status' do
|
||||||
expect(subject).to eq '/assets/ci_favicons/overlays/favicon_status_created.png'
|
expect(subject).to match_asset_path '/assets/ci_favicons/favicon_status_created.png'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -173,7 +173,7 @@ describe JiraService do
|
||||||
object: {
|
object: {
|
||||||
url: "#{Gitlab.config.gitlab.url}/#{project.full_path}/commit/#{merge_request.diff_head_sha}",
|
url: "#{Gitlab.config.gitlab.url}/#{project.full_path}/commit/#{merge_request.diff_head_sha}",
|
||||||
title: "GitLab: Solved by commit #{merge_request.diff_head_sha}.",
|
title: "GitLab: Solved by commit #{merge_request.diff_head_sha}.",
|
||||||
icon: { title: "GitLab", url16x16: "http://localhost/favicon.ico" },
|
icon: { title: "GitLab", url16x16: "http://localhost/favicon.png" },
|
||||||
status: { resolved: true }
|
status: { resolved: true }
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
|
@ -39,7 +39,7 @@ describe BuildSerializer do
|
||||||
expect(subject[:label]).to eq('failed')
|
expect(subject[:label]).to eq('failed')
|
||||||
expect(subject[:tooltip]).to eq('failed <br> (unknown failure)')
|
expect(subject[:tooltip]).to eq('failed <br> (unknown failure)')
|
||||||
expect(subject[:icon]).to eq(status.icon)
|
expect(subject[:icon]).to eq(status.icon)
|
||||||
expect(subject[:favicon]).to match_asset_path("/assets/ci_favicons/#{status.favicon}.ico")
|
expect(subject[:favicon]).to match_asset_path("/assets/ci_favicons/#{status.favicon}.png")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ describe BuildSerializer do
|
||||||
expect(subject[:label]).to eq('passed')
|
expect(subject[:label]).to eq('passed')
|
||||||
expect(subject[:tooltip]).to eq('passed')
|
expect(subject[:tooltip]).to eq('passed')
|
||||||
expect(subject[:icon]).to eq(status.icon)
|
expect(subject[:icon]).to eq(status.icon)
|
||||||
expect(subject[:favicon]).to match_asset_path("/assets/ci_favicons/#{status.favicon}.ico")
|
expect(subject[:favicon]).to match_asset_path("/assets/ci_favicons/#{status.favicon}.png")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -174,7 +174,7 @@ describe PipelineSerializer do
|
||||||
expect(subject[:text]).to eq(status.text)
|
expect(subject[:text]).to eq(status.text)
|
||||||
expect(subject[:label]).to eq(status.label)
|
expect(subject[:label]).to eq(status.label)
|
||||||
expect(subject[:icon]).to eq(status.icon)
|
expect(subject[:icon]).to eq(status.icon)
|
||||||
expect(subject[:favicon]).to match_asset_path("/assets/ci_favicons/#{status.favicon}.ico")
|
expect(subject[:favicon]).to match_asset_path("/assets/ci_favicons/#{status.favicon}.png")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -18,17 +18,17 @@ describe StatusEntity do
|
||||||
it 'contains status details' do
|
it 'contains status details' do
|
||||||
expect(subject).to include :text, :icon, :favicon, :label, :group, :tooltip
|
expect(subject).to include :text, :icon, :favicon, :label, :group, :tooltip
|
||||||
expect(subject).to include :has_details, :details_path
|
expect(subject).to include :has_details, :details_path
|
||||||
expect(subject[:favicon]).to match_asset_path('/assets/ci_favicons/favicon_status_success.ico')
|
expect(subject[:favicon]).to match_asset_path('/assets/ci_favicons/favicon_status_success.png')
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'contains a dev namespaced favicon if dev env' do
|
it 'contains a dev namespaced favicon if dev env' do
|
||||||
allow(Rails.env).to receive(:development?) { true }
|
allow(Rails.env).to receive(:development?) { true }
|
||||||
expect(entity.as_json[:favicon]).to match_asset_path('/assets/ci_favicons/dev/favicon_status_success.ico')
|
expect(entity.as_json[:favicon]).to match_asset_path('/assets/ci_favicons/favicon_status_success.png')
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'contains a canary namespaced favicon if canary env' do
|
it 'contains a canary namespaced favicon if canary env' do
|
||||||
stub_env('CANARY', 'true')
|
stub_env('CANARY', 'true')
|
||||||
expect(entity.as_json[:favicon]).to match_asset_path('/assets/ci_favicons/canary/favicon_status_success.ico')
|
expect(entity.as_json[:favicon]).to match_asset_path('/assets/ci_favicons/canary/favicon_status_success.png')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -789,7 +789,7 @@ describe SystemNoteService do
|
||||||
object: {
|
object: {
|
||||||
url: project_commit_url(project, commit),
|
url: project_commit_url(project, commit),
|
||||||
title: "GitLab: Mentioned on commit - #{commit.title}",
|
title: "GitLab: Mentioned on commit - #{commit.title}",
|
||||||
icon: { title: "GitLab", url16x16: "http://localhost/favicon.ico" },
|
icon: { title: "GitLab", url16x16: "http://localhost/favicon.png" },
|
||||||
status: { resolved: false }
|
status: { resolved: false }
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -815,7 +815,7 @@ describe SystemNoteService do
|
||||||
object: {
|
object: {
|
||||||
url: project_issue_url(project, issue),
|
url: project_issue_url(project, issue),
|
||||||
title: "GitLab: Mentioned on issue - #{issue.title}",
|
title: "GitLab: Mentioned on issue - #{issue.title}",
|
||||||
icon: { title: "GitLab", url16x16: "http://localhost/favicon.ico" },
|
icon: { title: "GitLab", url16x16: "http://localhost/favicon.png" },
|
||||||
status: { resolved: false }
|
status: { resolved: false }
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -841,7 +841,7 @@ describe SystemNoteService do
|
||||||
object: {
|
object: {
|
||||||
url: project_snippet_url(project, snippet),
|
url: project_snippet_url(project, snippet),
|
||||||
title: "GitLab: Mentioned on snippet - #{snippet.title}",
|
title: "GitLab: Mentioned on snippet - #{snippet.title}",
|
||||||
icon: { title: "GitLab", url16x16: "http://localhost/favicon.ico" },
|
icon: { title: "GitLab", url16x16: "http://localhost/favicon.png" },
|
||||||
status: { resolved: false }
|
status: { resolved: false }
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|