|
@@ -95,6 +95,7 @@ There are multiple improvements to the documentation theme this release, here ar
|
|
|
* Adjust breadcrumb text alignment and size in page listings & page editor (Steven Steinwand)
|
|
|
* Improvements to getting started tutorial aimed at developers who are very new to Python and have no Django experience (Damilola Oladele)
|
|
|
* The `image_url` template tag, when using the serve view to redirect rather than serve directly, will now use temporary redirects with a cache header instead of permanent redirects (Jake Howard)
|
|
|
+ * Add new test assertions to `WagtailPageTestCase` - `assertPageIsRoutable`, `assertPageIsRenderable`, `assertPageIsEditable`, `assertPageIsPreviewable` (Andy Babic)
|
|
|
|
|
|
### Bug fixes
|
|
|
|
|
@@ -135,6 +136,23 @@ There are multiple improvements to the documentation theme this release, here ar
|
|
|
|
|
|
After upgrading, you will need to run `./manage.py rebuild_references_index` in order to populate the references table and ensure that usage counts for images, documents and snippets are displayed accurately.
|
|
|
|
|
|
+### Recommend `WagtailPageTestCase` in place of `WagtailPageTests`
|
|
|
+
|
|
|
+* `WagtailPageTestCase` is the base testing class and is now recommended over using `WagtailPageTestCase` [](testing_reference).
|
|
|
+* `WagtailPageTests` will continue to work and does log in the user on test `setUp` but may be deprecated in the future.
|
|
|
+
|
|
|
+```python
|
|
|
+# class MyPageTests(WagtailPageTests): # old
|
|
|
+class MyPageTests(WagtailPageTestCase): # new
|
|
|
+ def setUp(self):
|
|
|
+ # WagtailPageTestCase will not log in during setUp - so add if needed
|
|
|
+ super().setUp()
|
|
|
+ self.login()
|
|
|
+
|
|
|
+ def test_can_create_a_page(self):
|
|
|
+ # ...
|
|
|
+```
|
|
|
+
|
|
|
### Button styling class changes
|
|
|
|
|
|
The `button-secondary` class is no longer compatible with either the `.serious` or `.no` classes, this partially worked previously but is no longer officially supported.
|