Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avoid "ember-cli-page-object.string-properties-on-definitio" deprecation #30

Merged
merged 1 commit into from
Feb 6, 2021

Conversation

ro0gr
Copy link

@ro0gr ro0gr commented Feb 6, 2021

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:

 isActive: hasClass('is-active', '[data-test-toggle-button]');

But seems the point of this page object is to demonstrate/test native get support for the isActive, 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.

@mixonic
Copy link
Member

mixonic commented Feb 6, 2021

@ro0gr ah thanks for this! I was literally just looking at this and wrote the same patch! :-)

@mixonic mixonic merged commit c968b0b into Addepar:master Feb 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants