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

Feat/native getters #482

Merged
merged 2 commits into from
Mar 11, 2020
Merged

Feat/native getters #482

merged 2 commits into from
Mar 11, 2020

Conversation

ro0gr
Copy link
Collaborator

@ro0gr ro0gr commented Feb 16, 2020

restores #411

Huge thanks to @pzuraq for all the hard work done to implement this feature.

This PR allows users to use native `get` syntax directly on page
objects, as opposed to the `getter` macro. This syntax is much less
verbose and easier to read overall.

The implementation first ensures that all property descriptors are
correctly copied to the final definition, then updates objects in the
Ceibo builder to use the equivalent of the getter macro. This could also
be added directly to Ceibo, but would likely still require some changes
to ember-cli-page-object to ensure that descriptors are copied via
`getOwnPropertyDescriptor` and `defineProperty` and not via simple
assignment (which will activate the getter when attempting to assign
it).
@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 98.663% when pulling 91aaf26 on ro0gr:feat/native-getters into f999eba on san650:master.

@ro0gr ro0gr merged commit 68d5bfa into san650:master Mar 11, 2020
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