activity_stream_spec.rb 781 B

123456789101112131415161718192021222324252627282930
  1. # Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. require 'rails_helper'
  3. RSpec.describe 'Dashboard', type: :system do
  4. context 'when Ticket has name attribute', authenticated_as: :authenticate, db_strategy: :reset do
  5. def authenticate
  6. create(:object_manager_attribute_text, name: 'name', display: 'Name')
  7. ObjectManager::Attribute.migration_execute
  8. true
  9. end
  10. let(:ticket) { Ticket.first }
  11. let(:name_value) { 'activity stream test' }
  12. before do
  13. ticket.update! name: name_value
  14. end
  15. it 'shows ticket title in activity stream' do
  16. visit '/'
  17. within '.sidebar' do
  18. expect(page)
  19. .to have_no_text(name_value)
  20. .and have_text(ticket.title)
  21. end
  22. end
  23. end
  24. end