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

useNativeEvents should not be a part of the page object out of the box? #32

Open
ro0gr opened this issue Feb 7, 2021 · 3 comments
Open

Comments

@ro0gr
Copy link

ro0gr commented Feb 7, 2021

I've just observed the following in the codebase

// pre-emptively turn on native events since we'll need them
useNativeEvents();

I believe it should not be here, and if really needed, it should be called on the consumer test setup side.

The useNativeEvents( is used to enable the ember-native-dom-helpers, which was needed in the era of moduleFor* tests. Now, for the test suites using modern @ember/test-helpers, I don't think we need it anymore.

Also, useNativeEvents( is now removed in the v2-beta of the ec-page-objects, cause moduleFor test helpers are now removed completelly from @ember/test-helpers, so I think this invocation would break ember-classy-page-object under ember-cli-page-object@v2 when it's released.

So my guess is that we should remove it from here at some point, as a breaking change? @mixonic what do you think?

@mixonic
Copy link
Member

mixonic commented Feb 7, 2021

Hm, yeah I can try to make the change and see how it impacts the large codebases at Addepar. Good catch, thank you!

@ro0gr
Copy link
Author

ro0gr commented Feb 7, 2021

Just in case useNativeEvents( accepts a single boolean argument. By default it's true.

@DanMonroe
Copy link
Contributor

I've removed it as part of my testing the v2-beta. #36

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

No branches or pull requests

3 participants