Skip to content

Conversation

@lupyana
Copy link
Contributor

@lupyana lupyana commented Dec 10, 2025

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:

  • assertCanCreate
  • assertContains
  • assertTemplateUsed
  • assertEqual

see #534

Copy link
Member

@thibaudcolas thibaudcolas left a 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:

  1. Run the tests via the Makefile
  2. Run the tests in CI

Comment on lines 76 to 77
# Alternative: Use Wagtail's built-in assertion
self.assertPageIsRoutable(self.home)
Copy link
Member

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

@thibaudcolas thibaudcolas added the Djangonaut Space Contributions done via Djangonaut Space label Dec 10, 2025
@thibaudcolas thibaudcolas force-pushed the feature/534-add-demo-test branch from 98598ae to 0f71252 Compare December 22, 2025 16:34
@thibaudcolas thibaudcolas force-pushed the feature/534-add-demo-test branch from 0f71252 to cf0c8c5 Compare January 8, 2026 15:57
@thibaudcolas thibaudcolas force-pushed the feature/534-add-demo-test branch from cf0c8c5 to b75666d Compare January 8, 2026 15:59
Copy link
Member

@thibaudcolas thibaudcolas left a 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!

@thibaudcolas thibaudcolas merged commit 5b36529 into wagtail:main Jan 9, 2026
4 checks passed
@thibaudcolas thibaudcolas mentioned this pull request Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Djangonaut Space Contributions done via Djangonaut Space

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants