-
Notifications
You must be signed in to change notification settings - Fork 609
Add tests for page creation and rendering with StreamField #585
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
Conversation
thibaudcolas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking really solid! I’m not familiar with those APIs myself so will need to compare with the docs side-by-side before I do further review / merging.
Two changes I’d like to see as follow-up:
- Run the tests via the Makefile
- Run the tests in CI
| # Alternative: Use Wagtail's built-in assertion | ||
| self.assertPageIsRoutable(self.home) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed for a page type that doesn’t implement RoutablePageMixin
98598ae to
0f71252
Compare
0f71252 to
cf0c8c5
Compare
Co-authored-by: Lupyana <[email protected]>
Co-authored-by: Lupyana <[email protected]>
cf0c8c5 to
b75666d
Compare
thibaudcolas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ended up adding the CI setup to have a stronger guarantee this all works and will keep working, merging now!
added example tests demonstrating the creation of a new child page (using a StreamField in form data) and the rendering of a page. The tests use the following assertions:
see #534