diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-22 12:09:45 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-22 12:09:45 +0300 |
commit | b81fd57f3d62db4455108c8de4b8d7b8d403de35 (patch) | |
tree | d6750edadd7a35bb6719a28f8a56b4e4174a340a /spec/features/invites_spec.rb | |
parent | d17c58402b28c7eabe74df21b57ae31beec56b1f (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features/invites_spec.rb')
-rw-r--r-- | spec/features/invites_spec.rb | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/spec/features/invites_spec.rb b/spec/features/invites_spec.rb index e9960802378..014684c481c 100644 --- a/spec/features/invites_spec.rb +++ b/spec/features/invites_spec.rb @@ -64,13 +64,12 @@ RSpec.describe 'Group or Project invitations', :aggregate_failures do expect(find_field('Email').value).to eq(group_invite.invite_email) end - it 'sign in, grants access and redirects to group page' do + it 'sign in, grants access and redirects to group activity page' do click_link 'Sign in' fill_in_sign_in_form(user) - expect(current_path).to eq(group_path(group)) - expect(page).to have_content('You have been granted Developer access to group Owned.') + expect(current_path).to eq(activity_group_path(group)) end end @@ -117,26 +116,28 @@ RSpec.describe 'Group or Project invitations', :aggregate_failures do context 'email confirmation disabled' do let(:send_email_confirmation) { false } - it 'signs up and redirects to the dashboard page with all the projects/groups invitations automatically accepted' do + it 'signs up and redirects to the most recent membership activity page with all the projects/groups invitations automatically accepted' do fill_in_sign_up_form(new_user) fill_in_welcome_form - expect(current_path).to eq(dashboard_projects_path) - expect(page).to have_content(project.full_name) + expect(current_path).to eq(activity_group_path(group)) + expect(page).to have_content('You have been granted Owner access to group Owned.') visit group_path(group) - expect(page).to have_content(group.full_name) + + visit project_path(project) + expect(page).to have_content(project.name) end context 'the user sign-up using a different email address' do let(:invite_email) { build_stubbed(:user).email } - it 'signs up and redirects to the invitation page' do + it 'signs up and redirects to the activity page' do fill_in_sign_up_form(new_user) fill_in_welcome_form - expect(current_path).to eq(invite_path(group_invite.raw_invite_token)) + expect(current_path).to eq(activity_group_path(group)) end end end @@ -207,7 +208,7 @@ RSpec.describe 'Group or Project invitations', :aggregate_failures do fill_in_sign_in_form(new_user) fill_in_welcome_form - expect(current_path).to eq(invite_path(group_invite.raw_invite_token)) + expect(current_path).to eq(activity_group_path(group)) end end @@ -221,7 +222,7 @@ RSpec.describe 'Group or Project invitations', :aggregate_failures do fill_in_sign_up_form(new_user) fill_in_welcome_form - expect(current_path).to eq(invite_path(group_invite.raw_invite_token)) + expect(current_path).to eq(activity_group_path(group)) end end end @@ -273,7 +274,7 @@ RSpec.describe 'Group or Project invitations', :aggregate_failures do end end - context 'when accepting the invitation' do + context 'when accepting the invitation as an existing user' do let(:send_email_confirmation) { true } before do @@ -286,7 +287,7 @@ RSpec.describe 'Group or Project invitations', :aggregate_failures do page.click_link 'Accept invitation' - expect(current_path).to eq(group_path(group)) + expect(current_path).to eq(activity_group_path(group)) expect(page).to have_content('You have been granted Owner access to group Owned.') expect(group.users.include?(user)).to be true end |