profile_spec.rb 999 B

123456789101112131415161718192021222324252627282930313233343536
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. require 'rails_helper'
  3. require 'system/examples/core_workflow_examples'
  4. RSpec.describe 'Organization Profile', type: :system do
  5. let(:organization) { create(:organization) }
  6. describe 'when calling without session' do
  7. describe 'redirect to' do
  8. it 'login screen', authenticated_as: false do
  9. visit "#organization/profile/#{organization.id}"
  10. expect(page).to have_css('#login')
  11. end
  12. end
  13. end
  14. describe 'Core Workflow' do
  15. include_examples 'core workflow' do
  16. let(:object_name) { 'Organization' }
  17. let(:before_it) do
  18. lambda {
  19. ensure_websocket(check_if_pinged: false) do
  20. visit "#organization/profile/#{organization.id}"
  21. within(:active_content) do
  22. page.find('.profile .js-action').click
  23. page.find('.profile li[data-type=edit]').click
  24. end
  25. end
  26. }
  27. end
  28. end
  29. end
  30. end