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: add_email_spec.rb
    path of file: ./repos/identity-idp/spec/features/multiple_emails
    
    the code of the file until where you have to start completion: require 'rails_helper'

RSpec.feature 'adding email address', allowed_extra_analytics: [:*
    
  def sign_in_user_and_add_email(user, _add_email = true)
    sign_in_and_2fa_user(user)

    visit account_path

    expect(page).to have_link(t('account.index.email_add'))
    within('.sidenav') do
      click_on t('account.navigation.add_email')
    end

    expect(page).to have_current_path(add_email_path)

    fill_in t('forms.registration.labels.email'), with: email
    click_button t('forms.buttons.submit.default')

    expect(page).to have_current_path(add_email_verify_email_path)
    expect(page).to have_content email
  end