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