facebook_spec.rb 738 B

123456789101112131415161718192021222324
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. require 'rails_helper'
  3. RSpec.describe 'Manage > Channels > Facebook', integration: true, required_envs: %w[FACEBOOK_APPLICATION_ID FACEBOOK_APPLICATION_SECRET], type: :system do
  4. context 'when configuring app' do
  5. before { visit '/#channels/facebook' }
  6. it 'works as expected', :use_vcr do
  7. within :active_content do
  8. click '.btn--success'
  9. in_modal do
  10. fill_in 'application_id', with: ENV['FACEBOOK_APPLICATION_ID']
  11. fill_in 'application_secret', with: ENV['FACEBOOK_APPLICATION_SECRET']
  12. click '.btn--success'
  13. end
  14. expect(page).to have_text('Configure App')
  15. end
  16. end
  17. end
  18. end