You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With #797 we now have the capability to match powerfully on interactor filters, not just using deepEquals. This means that if you have html that is like:
<ptitle="In which we greet the user"> Hello User! How are you today?</p>
We don't necessarily want to have to type all of those things in the test case. like:
import{Paragraph}from'@bigtest/interactor';Paragraph("Hello User! Howe are you today?").has({title: "In which we greet the user"});
Not only is this ugly, but it's brittle in the event that we want to do something like change the punctuation or capitalization. This is the kind of case that matchers were meant to solve. Matchers can be used both for locators and filters in finding interactors and also for making assertions. Thus, the above could be re-written as:
With #797 we now have the capability to match powerfully on interactor filters, not just using
deepEquals
. This means that if you have html that is like:We don't necessarily want to have to type all of those things in the test case. like:
Not only is this ugly, but it's brittle in the event that we want to do something like change the punctuation or capitalization. This is the kind of case that matchers were meant to solve. Matchers can be used both for locators and filters in finding interactors and also for making assertions. Thus, the above could be re-written as:
Not only do we have the
including()
, andmatching()
matchers, but there are also combinators:or()
,and()
,not()
:And quantifiers
some()
,every()
for working with filters that are iterable:We need to integrate these matchers into the guides. Maybe even under their own section.
The text was updated successfully, but these errors were encountered: