telegram_spec.rb 663 B

123456789101112131415161718
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. require 'rails_helper'
  3. RSpec.describe 'Manage > Channels > Telegram', integration: true, required_envs: %w[TELEGRAM_TOKEN], retry: 5, retry_wait: 30.seconds, type: :system do
  4. before { visit '/#channels/telegram' }
  5. it 'does connect and add the token' do
  6. Setting.set('fqdn', 'example.com')
  7. Setting.set('http_type', 'https')
  8. page.find('.js-new').click
  9. page.find('#api_token').set(ENV['TELEGRAM_TOKEN'])
  10. page.find('#welcome').set('hii')
  11. page.find('#goodbye').set('cyaa')
  12. page.find('.js-submit').click
  13. expect(page).to have_text('ZammadCIBot')
  14. end
  15. end