have_editor_bar.rb 588 B

123456789101112131415161718
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. module KnowledgeBasePublicMatchers
  3. module HaveEditorBar
  4. extend RSpec::Matchers::DSL
  5. matcher :have_editor_bar do
  6. match { actual.has_css? '.topbar' }
  7. description { 'display editor bar' }
  8. failure_message { 'expected to find editor bar above header, but did not' }
  9. failure_message_when_negated { 'expected not to find editor bar above header, but did' }
  10. end
  11. end
  12. end
  13. RSpec.configure do |config|
  14. config.include KnowledgeBasePublicMatchers::HaveEditorBar, type: :system
  15. end