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/invitation_spec` to cuprite
Aaron Contreras8aa51feef237
diff --git a/spec/features/users/invitation_spec.rb b/spec/features/users/invitation_spec.rbindex 926d8e8a41b..0c1620af9f7 100644--- a/spec/features/users/invitation_spec.rb+++ b/spec/features/users/invitation_spec.rb@@ -28,38 +28,43 @@require 'spec_helper'-RSpec.describe 'invitation spec', js: true do+RSpec.describe 'invitations', js: true, with_cuprite: true dolet(:user) { create(:invited_user, mail: '[email protected]') }before doallow(User).to receive(:current).and_return current_userend- shared_examples 'resends the invitation' do- visit edit_user_path(user)- click_on I18n.t(:label_send_invitation)- expect(page).to have_text 'An invitation has been sent to [email protected].'+ shared_examples 'resending invitations' do+ it 'resends the invitation' do+ visit edit_user_path(user)+ click_on I18n.t(:label_send_invitation)+ expect(page).to have_text 'An invitation has been sent to [email protected].'- # Logout admin- logout+ # Logout admin+ logout- # Visit invitation with wrong token- visit account_activate_path(token: 'some invalid value')- expect(page).to have_text 'Invalid activation token'+ # Visit invitation with wrong token+ visit account_activate_path(token: 'some invalid value')+ expect(page).to have_text 'Invalid activation token'- # Visit invitation link with correct token- visit account_activate_path(token: Token::Invitation.last.value)+ # Visit invitation link with correct token+ visit account_activate_path(token: Token::Invitation.last.value)- expect(page).to have_selector('.spot-modal--header', text: 'Welcome to OpenProject')+ expect(page).to have_selector('.spot-modal--header', text: 'Welcome to OpenProject')+ endendcontext 'as admin' doshared_let(:admin) { create(:admin) }let(:current_user) { admin }+ include_examples 'resending invitations'endcontext 'as global user' doshared_let(:global_manage_user) { create(:user, global_permission: :manage_user) }let(:current_user) { global_manage_user }++ include_examples 'resending invitations'endend