ember-cli-page-object icon indicating copy to clipboard operation
ember-cli-page-object copied to clipboard

`contains` documentation specifies text, but is actually selector

Open benshine opened this issue 9 years ago • 1 comments

The documentation for contains says "Returns a boolean representing whether an element or a set of elements contains the specified text." but I think it's actually looking for the specified selector, Just below that, the doc says the parameters are "Parameters selector string CSS selector of the element to check"

benshine avatar Jul 06 '16 00:07 benshine

@benshine we need to improve the documentation.

The idea is that when you define a property on a page object using the contains helper, you need to indicate on which element you want to perform the operation, so you use a selector when defining the property. This helper generates a function which receives the text to look for.

So it receives a selector string when you declare the property but the generated function receives a text to look for.

san650 avatar Jul 06 '16 16:07 san650