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
ENHANCEMENT - setupPageComponentTest
for hooks with easier setup with test APIs
#444
Comments
I think it makes sense to include it in the package. Can you create a PR? |
Yeah I'll make a PR and some docs on how to use ECPO in integration tests for components. |
Hi, there is actually a PR already for that #432 |
As far as I understand this helper is supposed to enable I think a test helper for a specific page object is a bad path to go. What if the test needs few page objects to use? The relevant test setup would look something like: setupPageComponentTest(hooks, page1);
setupPageComponentTest(hooks, page2); which doesn't look good to me, since we never want different test modes within the same test. I mean that the test mode seems like a global state within a test to me. But we currently store and read it from the specific pageObject instance. I think with the new test helper we can do better, by setting a test mode globally and then take care to clean it up in setupPageObjects(hooks, {
moduleForComponent: true
}) I think it's even possible to do it in a backward compat way(supporting Hope it makes sense and sorry for quite confusing thoughts dump(a bit under preassure now)... |
My 2 cents: #432 (comment) |
Just a suggestion in our app we have started using a hook helper function (in QUnit tests) like this:
This removes a lot of boilerplate from our component tests since we don't need to set the context and remove context for component tests using EPO.
I'm not sure if this is something other teams would value?
The one worry I have (and why I did not create a PR yet) is that this helper is coupled to
ember-qunit
...The text was updated successfully, but these errors were encountered: