theme_spec.rb 770 B

123456789101112131415161718192021222324252627282930
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. require 'rails_helper'
  3. # https://github.com/zammad/zammad/issues/266
  4. RSpec.describe 'Admin Panel > Knowledge Base > Theme', type: :system do
  5. include_context 'basic Knowledge Base'
  6. context 'header link color' do
  7. before do
  8. knowledge_base
  9. visit '/#manage/knowledge_base'
  10. end
  11. it 'shows color' do
  12. elem = find('#color_header_link input')
  13. expect(elem.value).to eq knowledge_base.color_header_link
  14. end
  15. it 'saves new color' do
  16. find('#color_header_link input').fill_in with: '#ccc'
  17. find('#color_header_link button').click
  18. await_empty_ajax_queue
  19. expect(knowledge_base.reload.color_header_link).to eq '#ccc'
  20. end
  21. end
  22. end