I propose to add BaseQuery, TextQuery, TitleQuery and use them instead of Query where necessary.
It would allow to assert keys more properly. Some keys that are supported by has_selector? aren't supported by has_text?.
Also I propose to fix #1179 by doing something like:
@actual = wrap(actual)
@query = Capybara::TextQuery.new(*args)
raise Capybara::ExpectationNotMet if @query.execute_for(@actual)
i.e. move Finders#text_found? to TextQuery.
If Finders#text_found? will be moved to TextQuery the same should be done for Finders#resolve_query
I've never liked Finders#resolve_query. I think I'm on this.
@abotalov Ok to close this since its basically in the latest changes?