Commit a158bec3 authored by Peter Hegman's avatar Peter Hegman

Merge branch 'jivanvl-replace-badge-shared-runners-show' into 'master'

Replace badges in the shared_runners -> show view

See merge request gitlab-org/gitlab!76257
parents 97153f9b 99ad081f
......@@ -13,8 +13,7 @@
= sprite_icon('tag')
= @tag.name
- if protected_tag?(@project, @tag)
%span.badge.badge-success
= s_('TagsPage|protected')
= gl_badge_tag s_('TagsPage|protected'), variant: :success
- if user
= link_to user_path(user) do
......
......@@ -28,8 +28,7 @@
%td= s_('Runners|Tags')
%td
- runner.tag_list.sort.each do |tag|
%span.badge.badge-primary
= tag
= gl_badge_tag tag, variant: :info
%tr
%td= s_('Runners|Name')
%td= runner.name
......
......@@ -113,14 +113,14 @@ RSpec.describe 'shared/runners/_runner_details.html.haml' do
describe 'Tags value' do
context 'when runner does not have tags' do
it { is_expected.to have_content('Tags') }
it { is_expected.not_to have_selector('span.badge.badge-primary')}
it { is_expected.not_to have_selector('span.gl-badge.badge.badge-info')}
end
context 'when runner have tags' do
let(:runner) { create(:ci_runner, tag_list: %w(tag2 tag3 tag1)) }
it { is_expected.to have_content('Tags tag1 tag2 tag3') }
it { is_expected.to have_selector('span.badge.badge-primary')}
it { is_expected.to have_selector('span.gl-badge.badge.badge-info')}
end
end
......
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