You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: ownership_transfer_spec.rb
    path of file: ./repos/hyrax/spec/features
    
    the code of the file until where you have to start completion: # frozen_string_literal: true
RSpec.describe 'Transferring work ownership:', type: :feature do
  include Selectors::Dashboard
  include Selectors::NewTransfers
  
    
  def transfer_ownership_of_work(work, new_owner)
    visit '/dashboard/my/works'

    db_item_actions_toggle(work).click
    find('#action-transfer-work').click
    expect(page).to have_content I18n.t(:'hyrax.transfers.new.sr_only_description', work_title: work.title.first)
    new_owner_dropdown.click
    new_owner_search_field.set new_owner.user_key
    new_owner_search_result.click
    fill_in 'proxy_deposit_request[sender_comment]', with: 'Work transfer comments'
    accept_confirm { click_button "Transfer" }
  end