ember-cli-page-object
ember-cli-page-object copied to clipboard
Use 'includes' instead of 'contains'?
JS convention seems to have moved toward using the method name includes
instead of contains
. For enumerables, Ember is deprecating contains
, and includes
is pretty much the only available method on JS strings.
Shouldn't ember-cli-page-object
follow this same convention, and use includes
here instead of contains
? http://ember-cli-page-object.js.org/docs/v1.13.x/api/contains
@danwenzel I like the suggestion!
If we do this, we should deprecate contains
first and make includes
available. We could drop de deprecation in v2.0
includes
is not supported in IE (incase we are supporting it) can we go with good old indexOf
?
@mum-never-proud - I am referring to ember-cli-page-object
's method names
I think we should deprecate contains(
(after v2 is released) without making new includes(
API. Users can directly use built-in string method, like myNode.text.includes('something')