diff options
Diffstat (limited to 'spec/support/shared_examples/features/editable_merge_request_shared_examples.rb')
-rw-r--r-- | spec/support/shared_examples/features/editable_merge_request_shared_examples.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/support/shared_examples/features/editable_merge_request_shared_examples.rb b/spec/support/shared_examples/features/editable_merge_request_shared_examples.rb index 487c38da7da..c9910487798 100644 --- a/spec/support/shared_examples/features/editable_merge_request_shared_examples.rb +++ b/spec/support/shared_examples/features/editable_merge_request_shared_examples.rb @@ -124,3 +124,16 @@ end def get_textarea_height page.evaluate_script('document.getElementById("merge_request_description").offsetHeight') end + +RSpec.shared_examples 'an editable merge request with reviewers' do + it 'updates merge request', :js do + find('.js-reviewer-search').click + page.within '.dropdown-menu-user' do + click_link user.name + end + expect(find('input[name="merge_request[reviewer_ids][]"]', visible: false).value).to match(user.id.to_s) + page.within '.js-reviewer-search' do + expect(page).to have_content user.name + end + end +end |