diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-21 03:07:56 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-21 03:07:56 +0300 |
commit | 6fbaac1974d2e9a0e5296a9da2d99f356a684f91 (patch) | |
tree | 965884691ca08bf2c2a00e49a359c30515aaa813 /spec/support | |
parent | c972699d3975e61785389602bfc8078d3bc40091 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/shared_examples/features/content_editor_shared_examples.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/support/shared_examples/features/content_editor_shared_examples.rb b/spec/support/shared_examples/features/content_editor_shared_examples.rb index f70288168d7..2454bb7afc6 100644 --- a/spec/support/shared_examples/features/content_editor_shared_examples.rb +++ b/spec/support/shared_examples/features/content_editor_shared_examples.rb @@ -506,6 +506,8 @@ RSpec.shared_examples 'edits content using the content editor' do |params = { wi switch_to_content_editor type_in_content_editor :enter + + stub_feature_flags(disable_all_mention: false) end if params[:with_expanded_references] @@ -545,6 +547,26 @@ RSpec.shared_examples 'edits content using the content editor' do |params = { wi expect(page).to have_text('@abc123') end + context 'when `disable_all_mention` is enabled' do + before do + stub_feature_flags(disable_all_mention: true) + end + + it 'shows suggestions for members with descriptions' do + type_in_content_editor '@a' + + expect(find(suggestions_dropdown)).to have_text('abc123') + expect(find(suggestions_dropdown)).not_to have_text('All Group Members') + + type_in_content_editor 'bc' + + send_keys [:arrow_down, :enter] + + expect(page).not_to have_css(suggestions_dropdown) + expect(page).to have_text('@abc123') + end + end + it 'shows suggestions for merge requests' do type_in_content_editor '!' |