avoid "ember-cli-page-object.string-properties-on-definitio" deprecation #30
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
see http://ember-cli-page-object.js.org/docs/v1.17.x/deprecations.html#string-properties-on-definition
@mixonic I've assumed the problem described in san650/ember-cli-page-object#534 should have been somehow appeared in here, but instead I've noticed this deprecation on CI.
From the ec-page-object standpoint, the deprecation for the plain strings on definitions is a part of a plan to enable a more fluent way to write definitions. So at some point, any plain strings should be treated as a
scope
of nested component(san650/ember-cli-page-object#408).Wrapping
activeClass
with a getter, allows to hide a string from the ec-page-object, and it fixes the deprecation warning.Just in case, there is another possible direction to fix the deprecation, like:
But seems the point of this page object is to demonstrate/test native
get
support for theisActive
, so I went with adding another getter to the page object.I did also notice some other deprecations caused by outdated usage of ember
deprecate(
utility by ec-page-object. I'll try to fix it , and publish new version this weekend.