-
Notifications
You must be signed in to change notification settings - Fork 135
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
Unit test @Pages #41
Comments
What exactly is this issue addressing? I bumped into the issue that when testing implementation using the @page annotation, systemjs could not resolve the dependency for the Page method properly. More concretely, when importing the page class (annotated with @page), Zone.run would throw something along the lines "ionic_angular_1.Page is not a function". This github issue might be related. If so, I would be very much interested in solving it. |
@bengro - exactly, I've got it up and running in another project, will try to add something quickly.. |
That would be most splendid! If I can do something to speed things up, let me know. I'm assuming the problem is the transpilation/systemjs? I'm keen on seeing how you solved the problem. My first step would have been to find out how @component does it. Thanks a bunch @lathonez! |
@page is the same as @component with more dependencies I've set up the skeleton for the ClickerList @page. This should give you access to the 'clickerListComponentFixture' variable, through which you can get the page DOM. I found this blog really useful when I set it up for @components in the first place. |
Very helpful, thank you. |
slightly OT, how does current gulpfile/webpack corresponds to previous test config? does it still execute tests or needs to be reenabled? |
Sorry, could you elaborate a little? |
I've found an answer. I haven't noticed dedicated gulpfile for tests and github diff showing only the differences :) On my project I've managed to easily merge the gulpfile used only for testing with the new one generated by recent ionic cli. |
Cool. I wanted to keep the testing one separate to make things more obvious, particularly as the main one is maintained by Ionic. As you say they are easily merged. |
Didn't mean to close |
Within [email protected] the |
Similar to the component tests, we should be testing @Pages properly using DI so we can inspect the DOM during the tests.
The text was updated successfully, but these errors were encountered: