Skip to content

Commit

Permalink
remarks
Browse files Browse the repository at this point in the history
  • Loading branch information
mensfeld committed Sep 13, 2024
1 parent 7891d46 commit 2b2cfb5
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 1 deletion.
Binary file modified lib/karafka/web/ui/public/javascripts/application.min.js.gz
Binary file not shown.
Binary file modified lib/karafka/web/ui/public/stylesheets/application.min.css.gz
Binary file not shown.

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
66 changes: 66 additions & 0 deletions spec/lib/karafka/web/pro/ui/controllers/ux_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,70 @@
expect(body).to include(breadcrumbs)
end
end

# We test branding here because it does not require us to create topics
describe 'branding concept' do
let(:branding_cfg) { Karafka::Web.config.ui.branding }
let(:type) { :info }
let(:label) { 'branding_label' }
let(:notice) { 'branding_notice' }

before do
branding_cfg.type = type
branding_cfg.label = label
branding_cfg.notice = notice

get 'ux'
end

after do
branding_cfg.type = :info
branding_cfg.label = false
branding_cfg.notice = false
end

context 'when there is no label or notice' do
let(:label) { false }
let(:notice) { false }

it 'expect not to have them' do
expect(body).not_to include('branding_label')
expect(body).not_to include('branding_notice')
end
end

context 'when there is only info label' do
let(:notice) { false }

it 'expect to have only label' do
expect(body).to include('branding_label')
expect(body).not_to include('branding_notice')
end
end

context 'when there is only info notice' do
let(:label) { false }

it 'expect to have only notice' do
expect(body).to include('branding_notice')
expect(body).not_to include('branding_label')
end
end

context 'when there is notice and label' do
it 'expect to have both' do
expect(body).to include('branding_notice')
expect(body).to include('branding_label')
end
end

context 'when there is notice and label in warning' do
let(:type) { :warning }

it 'expect to have both' do
expect(body).to include('branding_notice')
expect(body).to include('branding_label')
end
end
end
end

0 comments on commit 2b2cfb5

Please sign in to comment.