telegram_spec.rb 628 B

123456789101112131415161718
  1. # Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
  2. require 'rails_helper'
  3. RSpec.describe 'Manage > Channels > Telgram', type: :system, integration: true, required_envs: %w[TELEGRAM_TOKEN] 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