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: trigger_email_notification_spec.rb
    path of file: ./repos/gitlabhq/qa/qa/specs/features/browser_ui/2_plan/email
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module QA
  RSpec.describe 'Plan', :orchestrated, :smtp, :reliable, product_group: :project_management do
    describe 'Email Notification' do
    
      def mailhog_json
        Support::Retrier.retry_until(sleep_interval: 1) do
          Runtime::Logger.debug(%(retrieving "#{QA::Runtime::MailHog.api_messages_url}"))

          mailhog_response = get QA::Runtime::MailHog.api_messages_url

          mailhog_data = JSON.parse(mailhog_response.body)
          total = mailhog_data.dig('total')
          subjects = mailhog_data.dig('items')
            .map { |item| mailhog_item_subject(item) }

          Runtime::Logger.debug(%(Total number of emails: #{total}))
          Runtime::Logger.debug(%(Subjects:\n#{subjects.join("\n")}))

          # Expect at least two invitation messages: group and project
          mailhog_data if mailhog_project_message_count(subjects) >= 1
        end
      end