diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-19 06:21:36 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-19 06:21:36 +0300 |
commit | eba7329faa534bc0ea9332e3278f2a74f61a79dc (patch) | |
tree | 39b4d3d4b8d77ebb6766e689d8b9210f0ea643d1 /spec/features | |
parent | f3b2c536778dcd0981134c702d97c6e4047b64d4 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/merge_request/user_creates_merge_request_spec.rb | 2 | ||||
-rw-r--r-- | spec/features/merge_request/user_edits_merge_request_spec.rb | 2 | ||||
-rw-r--r-- | spec/features/users/signup_spec.rb | 21 |
3 files changed, 19 insertions, 6 deletions
diff --git a/spec/features/merge_request/user_creates_merge_request_spec.rb b/spec/features/merge_request/user_creates_merge_request_spec.rb index fdc996ef39b..eab5cee976e 100644 --- a/spec/features/merge_request/user_creates_merge_request_spec.rb +++ b/spec/features/merge_request/user_creates_merge_request_spec.rb @@ -98,7 +98,7 @@ RSpec.describe 'User creates a merge request', :js, feature_category: :code_revi click_button('Create merge request') - expect(page).to have_content(title).and have_content("• #{forked_project.full_path}:fix ➔ master") + expect(page).to have_content(title).and have_content("requested to merge #{forked_project.full_path}:fix into master") end end end diff --git a/spec/features/merge_request/user_edits_merge_request_spec.rb b/spec/features/merge_request/user_edits_merge_request_spec.rb index 31b382be611..584a17ae33d 100644 --- a/spec/features/merge_request/user_edits_merge_request_spec.rb +++ b/spec/features/merge_request/user_edits_merge_request_spec.rb @@ -95,7 +95,7 @@ RSpec.describe 'User edits a merge request', :js, feature_category: :code_review click_button('Save changes') - expect(page).to have_content("• #{merge_request.source_branch} ➔ merge-test") + expect(page).to have_content("requested to merge #{merge_request.source_branch} into merge-test") expect(page).to have_content("changed target branch from #{merge_request.target_branch} to merge-test") end diff --git a/spec/features/users/signup_spec.rb b/spec/features/users/signup_spec.rb index 539c017dd0f..bb08ed7d07d 100644 --- a/spec/features/users/signup_spec.rb +++ b/spec/features/users/signup_spec.rb @@ -339,11 +339,24 @@ RSpec.describe 'Signup', :js, feature_category: :user_management do end context 'when invisible captcha detects malicious behaviour' do - it 'prevents from signing up' do - visit new_user_registration_path + context 'with form submitted quicker than timestamp_threshold', :freeze_time do + it 'prevents from signing up' do + visit new_user_registration_path - expect { fill_in_sign_up_form(new_user) }.not_to change { User.count } - expect(page).to have_content('That was a bit too quick! Please resubmit.') + expect { fill_in_sign_up_form(new_user) }.not_to change { User.count } + expect(page).to have_content('That was a bit too quick! Please resubmit.') + end + end + + context 'with honeypot field is filled' do + it 'prevents from signing up' do + visit new_user_registration_path + + find_field('If you are human, please ignore this field.', + visible: false).execute_script("this.value = 'bot'") + + expect { fill_in_sign_up_form(new_user) }.not_to change { User.count } + end end end end |