Sha256: 39ef77de39e644021ef2fedf6e8446d6224b8dc5fc37c2bbbcff4f23aa1814b6

Contents?: true

Size: 1.15 KB

Versions: 24

Compression:

Stored size: 1.15 KB

Contents

describe 'Roles Admin', type: :feature, js: true do
  let(:exhibit) { FactoryBot.create(:exhibit) }
  let(:exhibit_admin) { FactoryBot.create(:exhibit_admin, exhibit: exhibit) }
  before do
    login_as exhibit_admin

    visit spotlight.exhibit_dashboard_path(exhibit)
    click_link 'Users'
  end

  it 'has the appropriate status message when an existing user is added' do
    second_user = FactoryBot.create(:site_admin)

    click_link 'Add a new user'
    fill_in 'User key', with: second_user.email

    click_button 'Save changes'

    expect(page).to have_css('.alert-info', text: 'User has been updated.')
    expect(page).to have_css('.table.users td', text: second_user.email)
  end

  it 'persists invited users to the exhibits user list' do
    expect(page).not_to have_css('.label-warning pending-label', text: 'pending', visible: true)

    click_link 'Add a new user'
    fill_in 'User key', with: 'user@example.com'
    click_button 'Save changes'

    within('tr.invite-pending') do
      expect(page).to have_css('td', text: 'user@example.com')
      expect(page).to have_css('.label-warning.pending-label', text: 'pending', visible: true)
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
blacklight-spotlight-2.4.1 spec/features/javascript/roles_admin_spec.rb
blacklight-spotlight-2.4.0 spec/features/javascript/roles_admin_spec.rb
blacklight-spotlight-2.3.3 spec/features/javascript/roles_admin_spec.rb
blacklight-spotlight-2.3.2 spec/features/javascript/roles_admin_spec.rb
blacklight-spotlight-2.3.1 spec/features/javascript/roles_admin_spec.rb
blacklight-spotlight-2.3.0 spec/features/javascript/roles_admin_spec.rb
blacklight-spotlight-2.2.1 spec/features/javascript/roles_admin_spec.rb
blacklight-spotlight-2.2.0 spec/features/javascript/roles_admin_spec.rb
blacklight-spotlight-2.1.0 spec/features/javascript/roles_admin_spec.rb
blacklight-spotlight-2.0.2 spec/features/javascript/roles_admin_spec.rb
blacklight-spotlight-2.0.1 spec/features/javascript/roles_admin_spec.rb
blacklight-spotlight-2.0.0 spec/features/javascript/roles_admin_spec.rb
blacklight-spotlight-2.0.0.rc6 spec/features/javascript/roles_admin_spec.rb
blacklight-spotlight-2.0.0.rc5 spec/features/javascript/roles_admin_spec.rb
blacklight-spotlight-2.0.0.rc4 spec/features/javascript/roles_admin_spec.rb
blacklight-spotlight-2.0.0.rc3 spec/features/javascript/roles_admin_spec.rb
blacklight-spotlight-2.0.0.rc2 spec/features/javascript/roles_admin_spec.rb
blacklight-spotlight-2.0.0.rc1 spec/features/javascript/roles_admin_spec.rb
blacklight-spotlight-1.5.1 spec/features/javascript/roles_admin_spec.rb
blacklight-spotlight-1.4.1 spec/features/javascript/roles_admin_spec.rb