organization_profile_spec.rb 714 B

123456789101112131415161718192021222324
  1. # Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
  2. require 'rails_helper'
  3. RSpec.describe 'Organization Profile', type: :system do
  4. context 'members section' do
  5. let(:organization) { create(:organization) }
  6. let(:members) { organization.members.order(id: :asc) }
  7. before do
  8. create_list(:customer, 50, organization: organization)
  9. visit "#organization/profile/#{organization.id}"
  10. end
  11. it 'shows first 10 members and loads more on demand' do
  12. expect(page).to have_text(members[9].fullname)
  13. expect(page).to have_no_text(members[10].fullname)
  14. click '.js-showMoreMembers'
  15. expect(page).to have_text(members[10].fullname)
  16. end
  17. end
  18. end