OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Switch `users/edit_users_spec` to cuprite
Aaron Contrerasafa62e74f622
diff --git a/spec/features/users/edit_users_spec.rb b/spec/features/users/edit_users_spec.rbindex 6bb540a050a..d26190646e2 100644--- a/spec/features/users/edit_users_spec.rb+++ b/spec/features/users/edit_users_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'edit users', js: true do+RSpec.describe 'edit users', js: true, with_cuprite: true doshared_let(:admin) { create(:admin) }let(:current_user) { admin }let(:user) { create(:user, mail: '[email protected]') }@@ -40,11 +40,11 @@ RSpec.describe 'edit users', js: true doenddef auth_select- find :css, 'select#user_auth_source_id'+ find 'select#user_auth_source_id'enddef user_password- find :css, 'input#user_password'+ find 'input#user_password'endcontext 'with internal authentication' do@@ -60,7 +60,7 @@ RSpec.describe 'edit users', js: true doit 'hides password settings when switching to an LDAP auth source' doauth_select.select auth_source.name- expect(page).not_to have_selector('input#user_password')+ expect(page).not_to have_field('#user_password')endend@@ -74,7 +74,7 @@ RSpec.describe 'edit users', js: true doit 'shows external authentication being selected and no password settings' doexpect(auth_select.value).to eq auth_source.id.to_s- expect(page).not_to have_selector('input#user_password')+ expect(page).not_to have_field('#user_password')endit 'shows password settings when switching back to internal authentication' do@@ -95,15 +95,19 @@ RSpec.describe 'edit users', js: true doexpect(page).not_to have_selector('.users-and-permissions-menu-item', text: 'Users and permissions')expect(page).to have_selector('.users-menu-item.selected', text: 'Users')- expect(page).to have_selector 'select#user_auth_source_id'- expect(page).not_to have_selector 'input#user_password'+ expect(page).to have_select(id: 'user_auth_source_id')+ expect(page).not_to have_field '#user_password'expect(page).to have_selector '#user_login'expect(page).to have_selector '#user_firstname'expect(page).to have_selector '#user_lastname'expect(page).to have_selector '#user_mail'- fill_in 'user[firstname]', with: 'NewName', fill_options: { clear: :backspace }+ firstname_field = find_by_id('user_firstname')+ firstname_field.value.length.times do+ firstname_field.send_keys(:backspace)+ end+ firstname_field.set 'NewName'select auth_source.name, from: 'user[auth_source_id]'click_on 'Save'