def wait_for_no_view(query,
                         timeout: Calabash::Wait.default_options[:timeout],
                         timeout_message: nil,
                         retry_frequency: Calabash::Wait.default_options[:retry_frequency])
      if query.nil?
        raise ArgumentError, 'Query cannot be nil'
      end

      timeout_message ||= lambda do |wait_options|
        "Waited #{wait_options[:timeout]} seconds for #{Wait.parse_query_list(query)} to not match any view"
      end

      wait_for(timeout_message,
               timeout: timeout,
               retry_frequency: retry_frequency,
               exception_class: ViewFoundError) do
        !view_exists?(query)
      end
    end
def wait_for_no_view(query,
                         timeout: Calabash::Wait.default_options[:timeout],
                         timeout_message: nil,
                         retry_frequency: Calabash::Wait.default_options[:retry_frequency])
      if query.nil?
        raise ArgumentError, 'Query cannot be nil'
      end

      timeout_message ||= lambda do |wait_options|
        "Waited #{wait_options[:timeout]} seconds for #{Wait.parse_query_list(query)} to not match any view"
      end

      wait_for(timeout_message,
               timeout: timeout,
               retry_frequency: retry_frequency,
               exception_class: ViewFoundError) do
        !view_exists?(query)
      end
    end
Waits for `query` not to match any views

 @example
  cal.wait_for_no_view({marked: 'mark'})

 @example
  cal.wait_for_no_view({marked: 'login'},
                  timeout_message: "Login button did not disappear")

 @see Calabash::Wait#wait_for for optional parameters

 @param [String, Hash, Calabash::Query] query Query to match view
 @raise [ViewFoundError] If `query` do not match at least one view.